Dotty Documentation

0.6.0-bin-SNAPSHOT

class AugmentScala2Traits
extends MiniPhase with IdentityDenotTransformer with FullParameterization

This phase augments Scala2 traits with implementation classes and with additional members needed for mixin composition. These symbols would have been added between Unpickling and Mixin in the Scala2 pipeline. Specifcally, it adds

  • an implementation class which defines a trait constructor and trait method implementations
  • trait setters for vals defined in traits

Furthermore, it expands the names of all private getters and setters as well as super accessors in the trait and makes them not-private.

[-] Constructors

AugmentScala2Traits ( )

[-] Members

[+] private def augmentScala2Trait ( mixin: ClassSymbol , cls: ClassSymbol ) ( implicit ctx: Context ) : Unit
[+] override def changesMembers : Boolean

Can this transform create or delete non-private 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 rewiredTarget ( referenced: Symbol , derived: Symbol ) ( implicit ctx: Context ) : Symbol

If references to original symbol referenced from within fully parameterized method derived should be rewired to some fully parameterized method, the rewiring target symbol, otherwise NoSymbol.

[+] override def transformTemplate ( impl: Template ) ( implicit ctx: Context ) : Tree