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 #2430: Make Erasure pass Ycheck #2927

Merged
merged 1 commit into from
Jul 31, 2017

Conversation

smarter
Copy link
Member

@smarter smarter commented Jul 27, 2017

During Erasure, a value class A with underlying type U has its type
semi-erased to ErasedValueType(A, [semi-erasure of U]). To make Erasure
typecheck, special cast functions A.evt2u$ and A.u2evt$ are used to cast
between the underlying type and the class EVT type. Before this commit,
this conversion was not always correctly done for nested value classes,
this did not lead to problems in practice but broke -Ycheck:erasure.

During Erasure, a value class A with underlying type U has its type
semi-erased to ErasedValueType(A, [semi-erasure of U]). To make Erasure
typecheck, special cast functions A.evt2u$ and A.u2evt$ are used to cast
between the underlying type and the class EVT type. Before this commit,
this conversion was not always correctly done for nested value classes,
this did not lead to problems in practice but broke -Ycheck:erasure.
@smarter smarter requested a review from odersky July 27, 2017 17:19
@DarkDimius
Copy link
Member

Looks like the right approach. Great to ycheck erasure again.

@DarkDimius DarkDimius merged commit f561301 into scala:master Jul 31, 2017
@allanrenucci allanrenucci deleted the fix-Ycheck-erasure branch December 14, 2017 19:19
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.

None yet

2 participants