Dotty Documentation


class PhantomArgLift
extends MiniPhase

This phase extracts the arguments of phantom type before the application to avoid losing any effects in the argument tree. This trivializes the removal of parameter in the Erasure phase.

f(x1,...)(y1,...)...(...) with at least one phantom argument


val ev$f = f // if f is some expression that needs evaluation val ev$x1 = x1 ... val ev$y1 = y1 ... ev$f(ev$x1,...)(ev$y1,...)...(...)

[-] Constructors

PhantomArgLift ( )

[-] Members

[+] override def checkPostCondition ( tree: Tree ) ( implicit ctx: Context ) : Unit

Check what the phase achieves, to be called at any point after it is finished.

[+] private def hasImpurePhantomArgs ( tree: Apply ) ( implicit ctx: Context ) : Boolean

Returns true if at least on of the arguments is an impure phantom. Inner applies are also checked in case of multiple parameter list.

[+] override def phaseName : String

A name given to the Phase that can be used to debug the compiler. For instance, it is possible to print trees after a given phase using:

$ ./bin/dotc -Xprint:<phaseNameHere> sourceFile.scala
[+] override def transformApply ( tree: Apply ) ( implicit ctx: Context ) : Tree