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 2.13.9 regression which broke binary compatibility of case classes which are also value classes #10155

Merged
merged 1 commit into from Sep 26, 2022

Conversation

som-snytt
Copy link
Contributor

@som-snytt som-snytt commented Sep 23, 2022

Fixes scala/bug#12650, reverts #10002

@scala-jenkins scala-jenkins added this to the 2.13.10 milestone Sep 23, 2022
@SethTisue SethTisue added the prio:blocker release blocker (used only by core team, only near release time) label Sep 23, 2022
@joroKr21
Copy link
Member

Instead of full revert can we only add it to AnyVals?

@som-snytt
Copy link
Contributor Author

@joroKr21 That's an idea, if one were suitably motivated. However, the goal of the previous PR was to simplify. On the upside, "Fixed in Scala 3."

Invoking the trait method is marginally better than the method on module ScalaRunTime.

The value class gets to call the extension method on its companion, where it is boxed and sent to ScalaRunTime. It could just Iterator.single(productElement(0)).

Copy link
Member

@lrytz lrytz left a comment

Choose a reason for hiding this comment

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

Value classes agian... I agree to revert the change, at least as a first step. Thank you @som-snytt

@lrytz lrytz merged commit 8c6b49b into scala:2.13.x Sep 26, 2022
@som-snytt som-snytt deleted the issue/12650-missing-product-extension branch September 26, 2022 14:45
@SethTisue SethTisue added release-notes worth highlighting in next release notes and removed prio:blocker release blocker (used only by core team, only near release time) labels Sep 29, 2022
@SethTisue SethTisue changed the title Revert using mixin productIterator for case class Fix regression in 2.13.9 which broke binary compatibility of case classes which are also value classes Oct 8, 2022
@SethTisue SethTisue changed the title Fix regression in 2.13.9 which broke binary compatibility of case classes which are also value classes Fix 2.13.9 regression which broke binary compatibility of case classes which are also value classes Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes worth highlighting in next release notes
Projects
None yet
5 participants