Skip to content
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

Fix default args lookup for given classes #20256

Merged
merged 1 commit into from
Apr 26, 2024
Merged

Conversation

mbovel
Copy link
Member

@mbovel mbovel commented Apr 24, 2024

Fixes #20088.

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.

I am confused now. Was the problem not that we created a companion object that clashed with the associated given method. It seems we are still doing that. So why did the clash go away?

@mbovel
Copy link
Member Author

mbovel commented Apr 25, 2024

Was the problem not that we created a companion object that clashed with the associated given method.

I thought so, but actually that's not the cause of the problem. The lookup of default argument is the main problem.

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.

OK, I get it now. The fix looks good.

@odersky odersky merged commit 82afe52 into scala:main Apr 26, 2024
19 checks passed
@mbovel mbovel deleted the mb/20088 branch April 26, 2024 10:28
@Kordyjan Kordyjan added this to the 3.5.0 milestone May 10, 2024
WojciechMazur added a commit that referenced this pull request Jul 6, 2024
Backports #20256 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
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.

Default given value doesn't work inside given definition
3 participants