Check what the phase achieves, to be called at any point after it is finished.
Check what the phase achieves, to be called at any point after it is finished.
The sequence position of this phase in the given context where 0 is reserved for NoPhase and the first real phase is at position 1.
The sequence position of this phase in the given context where 0 is reserved for NoPhase and the first real phase is at position 1. -1 if the phase is not installed in the context.
id of this mini phase in group
id of this mini phase in group
Output should be checkable by TreeChecker
Output should be checkable by TreeChecker
Is this phase the standard typerphase? True for FrontEnd, but not for other first phases (such as FromTasty).
Is this phase the standard typerphase? True for FrontEnd, but not for other first phases (such as FromTasty). The predicate is tested in some places that perform checks and corrections. It's different from isAfterTyper (and cheaper to test).
The last phase during which the transformed denotations are valid
The last phase during which the transformed denotations are valid
the following two members override abstract members in Transform
the following two members override abstract members in Transform
If set, allow missing or superfluous arguments in applications and type applications.
If set, allow missing or superfluous arguments in applications and type applications.
List of names of phases that should precede this phase
List of names of phases that should precede this phase
List of names of phases that should have finished their processing of all compilation units before this phase starts
List of names of phases that should have finished their processing of all compilation units before this phase starts
The transformation method
The transformation method
Throws an UnsupportedOperationException
with the given method name.
Throws an UnsupportedOperationException
with the given method name.
The validity period of the transformer in the given context
The validity period of the transformer in the given context
This phase performs the necessary rewritings to eliminate classes and methods nested in other methods. In detail:
A particularly tricky case are local traits. These cannot store free variables as field proxies, because LambdaLift runs after Mixin, so the fields cannot be expanded anymore. Instead, methods of local traits get free variables of the trait as additional proxy parameters. The difference between local classes and local traits is illustrated by the two rewritings below.
def f(x: Int) = { def f(x: Int) = new C(x).f2 class C { ==> class C(x$1: Int) { def f2 = x def f2 = x$1 } } new C().f2 }
def f(x: Int) = { def f(x: Int) = new C().f2(x) trait T { ==> trait T def f2 = x def f2(x$1: Int) = x$1 } } class C extends T class C extends T new C().f2 }