Dotty Documentation

0.2.0-bin-SNAPSHOT

object PhantomErasure

Phantom erasure erases (minimal erasure):

  • Parameters/arguments are erased to ErasedPhantom. The next step will remove the parameters from the method definitions and calls (implemented in branch implement-phantom-types-part-2).
  • Definitions of def, val, lazy val and var returning a phantom type to return a ErasedPhantom. Where fields with ErasedPhantom type are not memoized (see transform/Memoize.scala).
  • Calls to Phantom.assume become calls to ErasedPhantom.UNIT. Intended to be optimized away by local optimizations.

[-] Constructors

[-] Members

[+] def erasedAssume ( implicit ctx: Context ) : Tree

Returns the default erased tree for a call to Phantom.assume

[+] def erasedPhantomType ( implicit ctx: Context ) : Type

Returns the default erased type of a phantom type