Skip to content

Fix #1567: Widen private constructor in value class #1595

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
Oct 20, 2016

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Oct 14, 2016

Private or protected constructors of value classes need to be widenened
to public in order to enable boxing anywhere.

Technically we should also do something about qualified private constructors, but since we
want to get rid of them anyway it's urgent.

Review by @OlivierBlanvillain

Private or protected constructors of value classes need to be widenened
to public in order to enable boxing anywhere.

Technically we should also do something about qualified private constructors, but since we
want to get rid of them anyway it's urgent.
@@ -32,6 +32,9 @@ import SymUtils._
* in [[ElimErasedValueType]].
* This is different from the implementation of value classes in Scala 2
* (see SIP-15) which uses `asInstanceOf` which does not typecheck.
*
* Finally, if the constructor of a value class is private pr protected
Copy link
Member

Choose a reason for hiding this comment

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

typo: pr -> or

Copy link
Contributor

@OlivierBlanvillain OlivierBlanvillain left a comment

Choose a reason for hiding this comment

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

LGTM!

@odersky odersky merged commit cd23560 into scala:master Oct 20, 2016
@allanrenucci allanrenucci deleted the fix-#1567 branch December 14, 2017 16:59
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.

3 participants