TeamREPENTOGON / TeamREPENTOGON/REPENTOGON

[Parser] Add support for covariant return types in overriden functions

Open
#501 2 comments 0 reactions 1 assignee View on GitHub

@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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.