Skip to content

Consistent override checking #9477

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 10, 2020
Merged

Conversation

smarter
Copy link
Member

@smarter smarter commented Aug 1, 2020

In 7964d17,
OverridingPairs.Cursor#matches was changed to use Denotations#matches
instead of Types#matches to make the override check more precise, but
the same was not done in
RefChecks#checkAllOverrides#hasMatchingSym#isSignatureMatch, which
lead to inconsistencies: in the added testcase, the definition of foo
in B doesn't override anything, but because OverridingPairs and
RefChecks disagreed on what an override was, that did not produce any
error.

@smarter smarter requested a review from odersky August 1, 2020 16:09
In 7964d17,
`OverridingPairs.Cursor#matches` was changed to use Denotations#matches
instead of Types#matches to make the override check more precise, but
the same was not done in
`RefChecks#checkAllOverrides#hasMatchingSym#isSignatureMatch`, which
lead to inconsistencies: in the added testcase, the definition of `foo`
in `B` doesn't override anything, but because OverridingPairs and
RefChecks disagreed on what an override was, that did not produce any
error.
@smarter smarter force-pushed the fix-override-check branch from 91e3420 to 32a10d5 Compare August 9, 2020 12:45
@odersky odersky merged commit 5856123 into scala:master Aug 10, 2020
@odersky odersky deleted the fix-override-check branch August 10, 2020 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants