Dotty Documentation


class ExplicitSelf
extends MiniPhase

Transform references of the form


where C is a class with explicit self type and C is not a subclass of the owner of m to

C.this.asInstanceOf[S & C.this.type].m

where S is the self type of C. See run/i789.scala for a test case why this is needed.

Also replaces idents referring to the self type with ThisTypes.

[-] Constructors

ExplicitSelf ( )

[-] Members

[+] 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 transformIdent ( tree: Ident ) ( implicit ctx: Context ) : Tree
[+] override def transformSelect ( tree: Select ) ( implicit ctx: Context ) : Tree