-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Ignore selection prototypes when typing type applications #24489
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
base: main
Are you sure you want to change the base?
Conversation
Ignore selection prototypes at first when typing type applications. If we need them later for overloading disambiguation, reveal the ignored type. The reason for doing this is that a selection might come from an extension method, and in this case we should not require the selected name as a member of the result. This change breaks one test (overloading-specifity-2.scala) that explicitly tested that we don't consult implicit arguments for disambiguation since the expected type was a selection that already determined the outcome. This is logic no longer holds. We have to see whether this change breaks any code in practice. Fixes scala#23773
|
@hamzaremmal I am surprised to not see community build tasks in the task list. Where are they? |
|
They are there, they just kick in later. |
|
@WojciechMazur can we have an Open CB run on this PR? Thanks. |
|
Sure, I'll schedule the build as soon as I'll fix some infra problems |
|
This should be backported to 3.8.0 if it works but not to 3.3 since it involves a change in behavior. |
Yes, the label is for 3.8.0, not 3.3.x |
hamzaremmal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I'll wait for the Open CB run result before approving.
Ignore selection prototypes at first when typing type applications. If we need them later for overloading disambiguation, reveal the ignored type.
The reason for doing this is that a selection might come from an extension method, and in this case we should not require the selected name as a member of the result.
This change breaks one test (overloading-specifity-2.scala) that explicitly tested that we don't consult implicit arguments for disambiguation since the expected type was a selection that already determined the outcome. This logic no longer holds. We have to see whether this change breaks any code in practice.
Fixes #23773