TeamREPENTOGON / TeamREPENTOGON/REPENTOGON
[Parser] Add support for covariant return types in overriden functions
Open
@Sylmir is already working on this.
Since Jul 5, 2024.
ZHL
- Dominant language
- C++
- Stars
- 345
- Forks
- 51
- Avg merge
- 11h 2m
- Merged PRs (30d)
- 4
Description
Right now, if class B derives from A, and overrides a function from A while changing the return type of the function, the ZHL parser rejects the override as ill-formed. According to the rules of C++, virtual overrides are allowed to change the return type to any type that is covariant with the original type.
Covariance in C++ restricted to ZHL can be reduced to "the return type of the function in A is a base of the return type of the function in B".
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.