Skip to content

Prefer parameterless alternatives during ambiguous overload resolution #16315

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
Nov 17, 2022

Conversation

TheElectronWill
Copy link
Contributor

@TheElectronWill TheElectronWill commented Nov 10, 2022

Fixes #10715.
Pair-programmed with @smarter this morning 😃

Parameterless alternatives were already preferred when there was no matching alternativ (#6955).
With this PR, they are also preferred when the alternatives are "ambiguous".

@TheElectronWill TheElectronWill changed the title Prefer parameterless alternatives during ambiguous resolution Prefer parameterless alternatives during ambiguous overload resolution Nov 10, 2022
@odersky
Copy link
Contributor

odersky commented Nov 17, 2022

Can we push this to staging please? I'd like to check it out to do a more convenient diff.

@TheElectronWill
Copy link
Contributor Author

Sure! I've copied the branch and pushed it to https://github.com/dotty-staging/dotty/tree/fix-10715

Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

LGTM. Very clear refactoring.

@odersky odersky merged commit 671b1f5 into scala:main Nov 17, 2022
@TheElectronWill TheElectronWill deleted the fix-10715 branch November 17, 2022 12:23
@Kordyjan Kordyjan added this to the 3.3.0 milestone Aug 1, 2023
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.

Ambiguous overload using JDK 11
3 participants