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

Support inline overrides in value classes #16523

Merged
merged 3 commits into from
Jan 17, 2023
Merged

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Dec 14, 2022

Fixes #15725

Three fixes:

  • Don't make extension method copies of inline methods
  • Make retainedBody methods discoverable by entering them in their parent scope, so that they get an extension method
  • But strip the retainedBody in the extension method

Fixes scala#15725

Three fixes:

 - Don't make extension method copies of inline methods
 - Make retainedBody methods discoverable by entering them in their parent scope,
   so that they get an extension methos
 - But strip the retainedBody in the extension method
This was not noticed before since bodyRetainers were not entered in scope,
so were not subject to override checking.
Doubles print differently on ScalaJS, use Ints instead.
@nicolasstucki nicolasstucki self-requested a review December 14, 2022 19:42
@Kordyjan Kordyjan added this to the 3.3.1-RC1 milestone Jan 16, 2023
@odersky odersky merged commit 4cdd19b into scala:main Jan 17, 2023
@odersky odersky deleted the fix-15725 branch January 17, 2023 20:43
@Kordyjan Kordyjan modified the milestones: 3.3.1, 3.3.0 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.

Can't transparent inline override def toString() on a value class
3 participants