Run by -Ycheck option after a given phase, this class retypes all syntax trees and verifies that the type of each tree node so obtained conforms to the type found in the tree node. It also performs the following checks:
- The owner of each definition is the same as the owner of the current typing context.
- Ident nodes do not refer to a denotation that would need a select to be accessible (see tpd.needsSelect).
- After typer, identifiers and select nodes refer to terms only (all types should be represented as TypeTrees then).
New nodes are always wrapped inside
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