Skip to content

TypeErasure#erasure: do not semi-erase types by default #680

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 2 commits into from
Jun 26, 2015

Conversation

smarter
Copy link
Member

@smarter smarter commented Jun 22, 2015

This way we can simplify ClassOf.
Review by @DarkDimius .

@smarter smarter force-pushed the simplify/erasure branch from c01be5b to cb9a509 Compare June 22, 2015 18:57
@smarter
Copy link
Member Author

smarter commented Jun 22, 2015

Alternatively, we could make semi-erasure a Typer mode I think, but I'm not sure that this would make things clearer.

This method can be called from other phases than Erasure, and in most
cases we do not want the result to be semi-erased as this is an
implementation details of value classes only useful to do type
adaptation in the Erasure phase.
@smarter smarter force-pushed the simplify/erasure branch from cb9a509 to 2ab8aac Compare June 24, 2015 09:12
After the previous commit this special case is not needed anymore,
TypeErasure#erasure does the correct thing for value classes.
@smarter smarter force-pushed the simplify/erasure branch from 2ab8aac to d4d2ada Compare June 24, 2015 09:25
@odersky
Copy link
Contributor

odersky commented Jun 26, 2015

I think it would be better to have a method semiErasure alongside erasure instead of spreading the boolean parameter everywhere.

@odersky
Copy link
Contributor

odersky commented Jun 26, 2015

LGTM. I'll merge and then try to get rid of SemiEraseVCs altogether.

odersky added a commit that referenced this pull request Jun 26, 2015
TypeErasure#erasure: do not semi-erase types by default
@odersky odersky merged commit 6dbb991 into scala:master Jun 26, 2015
OlivierBlanvillain pushed a commit to OlivierBlanvillain/dotty that referenced this pull request Dec 8, 2016
Fixed bug scala#680 and scala#455 (duplicates) by carrying more typing context to
the backend for method calls.
OlivierBlanvillain pushed a commit to OlivierBlanvillain/dotty that referenced this pull request Dec 12, 2016
Fixed bug scala#680 and scala#455 (duplicates) by carrying more typing context to
the backend for method calls.
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