Post-attribution checking and transformation, which fulfills the following roles
- This phase performs the following checks.
- only one overloaded alternative defines default arguments
- applyDynamic methods are not overloaded
- all overrides conform to rules laid down by
- any value classes conform to rules laid down by
- this(...) constructor calls do not forward reference other definitions in their block (not even lazy vals).
- no forward reference in a local block jumps over a non-lazy val definition.
- a class and its companion object do not both define a class or module with the same name.
It warns about references to symbols labeled deprecated or migration.
It eliminates macro definitions.
- It makes members not private where necessary. The following members
cannot be private in the Java model:
- term members of traits
- the primary constructor of a value class
- the parameter accessor of a value class
- members accessed from an inner or companion class. All these members are marked as NotJavaPrivate. Unlike in Scala 2.x not-private members keep their name. It is up to the backend to find a unique expanded name for them. The rationale to do name changes that late is that they are very fragile.
todo: But RefChecks is not done yet. It's still a somewhat dirty port from the Scala 2 version. todo: move untrivial logic to their own mini-phases
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