aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymDenotations.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2015-03-18 23:56:07 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-05-01 13:26:22 +0200
commit391c80c4dfb2489e4098af33265b22332ef3d5f1 (patch)
tree206abc627f2a4cf5404547f554cd448492351a16 /src/dotty/tools/dotc/core/SymDenotations.scala
parentf168970f38df1d1ccc2b262f1a77f72cd4ec9f39 (diff)
downloaddotty-391c80c4dfb2489e4098af33265b22332ef3d5f1.tar.gz
dotty-391c80c4dfb2489e4098af33265b22332ef3d5f1.tar.bz2
dotty-391c80c4dfb2489e4098af33265b22332ef3d5f1.zip
Add synthetic casts to and from ErasedValueType
For a value class V, let U be the underlying type after erasure. We add to the companion object of V two cast methods: def u2evt$(x0: U): ErasedValueType(V, U) def evt2u$(x0: ErasedValueType(V, U)): U The casts are used in Erasure to make it typecheck, they are then removed in ElimErasedValueType (not yet present in this commit). This is different from the implementation of value classes in Scala 2 (see SIP-15) which uses `asInstanceOf` which does not typecheck.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
0 files changed, 0 insertions, 0 deletions