Skip to content

Fix #3352: Avoid widening method TermRefs in compatibility checks #3386

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 2 commits into from
Oct 26, 2017

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Oct 25, 2017

When normalizing for a compatibility check we should keep a method reference
instead of its widened method type as long as possible. This is because only
method references know about default arguments, once we widen to a method type
default arguments are no longer taken into account.

Supersedes #3357, from which it takes the essential solution idea.

When normalizing for a compatibility check we should keep a method reference
instead of its widened method type as long as possible. This is because only
method references know about default arguments, once we widen to a method type
default arguments are no longer taken into account.
@odersky odersky requested a review from liufengyun October 25, 2017 16:10
@odersky odersky changed the title Fix #3352: Avoid widening method types in compatibility checks Fix #3352: Avoid widening method TermRefs in compatibility checks Oct 25, 2017
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, except that the added test is incorrect.

@odersky
Copy link
Contributor Author

odersky commented Oct 25, 2017

LGTM, except that the added test is incorrect.

Ah yes, missed this one by a digit.

@odersky odersky merged commit 3c1bc32 into scala:master Oct 26, 2017
@allanrenucci allanrenucci deleted the fix-#3352 branch October 26, 2017 09:59
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