diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2015-03-18 23:56:19 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-05-01 13:26:23 +0200 |
commit | 5dec4ce8a64d44ee602c09d468414b13eecba389 (patch) | |
tree | 3df31764445c447029d2114e25c95d83a60e4c0a /src/dotty/tools/dotc/transform/ElimErasedValueType.scala | |
parent | 391c80c4dfb2489e4098af33265b22332ef3d5f1 (diff) | |
download | dotty-5dec4ce8a64d44ee602c09d468414b13eecba389.tar.gz dotty-5dec4ce8a64d44ee602c09d468414b13eecba389.tar.bz2 dotty-5dec4ce8a64d44ee602c09d468414b13eecba389.zip |
Erasure: properly erase value classes
There are three ways to erase a value class:
- In most case, it should be semi-erased to an ErasedValueType, which will be
fully erased to its underlying type in ElimErasedValueType.
This corresponds to semiEraseVCs = true in TypeErasure.
- In a few cases, it should be erased like a normal class, so far this
seems to be necessary for:
* The return type of a constructor
* The underlying type of a ThisType
* TypeTree nodes inside New nodes
* TypeApply nodes
* Arrays
In these cases, we set semiEraseVCs = false
- When calling `sigName` it should be erased to its underlying type.
This commit implements all these cases. Note that this breaks most tests
because ElimErasedValueType has not been implemented yet, it is part of
the next commit.
Diffstat (limited to 'src/dotty/tools/dotc/transform/ElimErasedValueType.scala')
0 files changed, 0 insertions, 0 deletions