This phase adds super accessors and method overrides where linearization differs from Java's rule for default methods in interfaces. In particular:
For every trait M directly implemented by the class (see SymUtils.mixin), in reverse linearization order, add the following definitions to C: 3.1 (done in `superAccessors`) For every superAccessor `<mods> def super$f[Ts](ps1)...(psN): U` in M: <mods> def super$f[Ts](ps1)...(psN): U = super[S].f[Ts](ps1)...(psN) where `S` is the superclass of `M` in the linearization of `C`. 3.2 (done in `methodOverrides`) For every method `<mods> def f[Ts](ps1)...(psN): U` in M` that needs to be disambiguated: <mods> def f[Ts](ps1)...(psN): U = super[M].f[Ts](ps1)...(psN) A method in M needs to be disambiguated if it is concrete, not overridden in C, and if it overrides another concrete method.
This is the first part of what was the mixin phase. It is complemented by Mixin, which runs after erasure.
Can this transform create or delete non-private members?
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
List of names of phases that should precede this phase