Skip to content

Specification: Update class implementation completeness check #563

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
eernstg opened this issue Sep 5, 2019 · 1 comment
Closed

Specification: Update class implementation completeness check #563

eernstg opened this issue Sep 5, 2019 · 1 comment

Comments

@eernstg
Copy link
Member

eernstg commented Sep 5, 2019

Cf. this comment, it is not correct to inherit an implementation whose parameters are not covariant into a class where the same declaration would only be correct when it is taken into account that the parameters would be covariant-by-declaration implicitly. But it is allowed to inherit an implementation whose parameters are not covariant into a class where the same declaration would only be correct when it is taken into account that the parameters would be covariant-by-class.

This needs to be taken into account in the specification of what it means for a class to be fully implemented. We already have this:

It is a compile-time error if C has a concrete accessible member with the same name
as m, with a method signature m0 which is not a correct override
of m (11.2.2), unless that concrete member is a noSuchMethod forwarder (10.1.2).

We need to make sure that the inherited member, with declaration D, whose signature is m0, is not considered to have parameters that are covariant-by-declaration based on C, it must be computed based on the enclosing class of the declaration D.

@eernstg
Copy link
Member Author

eernstg commented Aug 6, 2021

Done in #1770.

@eernstg eernstg closed this as completed Aug 6, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant