-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #806 signature matching #812
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
DarkDimius
merged 8 commits into
scala:master
from
dotty-staging:fix/#806-signature-matching
Sep 30, 2015
Merged
Fix #806 signature matching #812
DarkDimius
merged 8 commits into
scala:master
from
dotty-staging:fix/#806-signature-matching
Sep 30, 2015
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
needs rebasing |
Whenchecking whether two denotations match it is not enough to look at the signatures. The signatures might match (on the parameters) but the actual parametre types might be different. The change always tests infos after signatures, effectively turning the signature test into a pre-filter.
With the new approach to matching it is no longer sound. We always have to match infos anyway to be sure.
When determining what to refine we should not rely only on signatures but we need full denotation matching.
atSignature should also check result type names, except - if one of the result is a wildcard - a boolean flag relaxed is explicitly set
A test that checked for errors on overloading now succeeds with the new rules.
740032b
to
48a1f08
Compare
rebased to master |
When setting the denotation we did not change the checked period. This can lead to a situation where a denotation is set to NoDenotation, yet the checked period is something else. This means in effect the denotation will vanish at the checked period. This bug caused the junit test failure about "non-member exception" for sourceFile in DottyBackendInterface.
1) Matching after erasure also takes wildcards into account (before it didn't). 2) Combine all signature matching operations into a single matchDegree method.
containsSig still used param-only matching, which is incorrect in the new system, because different overloaded methods may have the same parameter signature.
All done. Ready for review. |
LGTM |
DarkDimius
added a commit
that referenced
this pull request
Sep 30, 2015
Fix #806 signature matching
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So far a a partial PR, need to check some more things.