This phase eliminates ExprTypes
=> T as types of method parameter references, and replaces them b
nullary function types. More precisely:
For the types of parameter symbols:
=> T ==> () => T
For cbn parameter values
x ==> x()
Note: This scheme to have inconsistent types between method types (whose formal types are still ExprTypes and parameter valdefs (which are now FunctionTypes) is not pretty. There are two other options which have been abandoned or not yet pursued.
Option 1: Transform => T to () => T also in method and function types. The problem with this is that is that it requires to look at every type, and this forces too much, causing Cyclic Reference errors. Abandoned for this reason.
Option 2: Merge ElimByName with erasure, or have it run immediately before. This has not been tried yet.
ftree was of ExprType and becomes now a function
Can this transform change the parents of a class?
Denotations with a symbol where
mayChange is false are guaranteed to be
unaffected by this transform, so
transformInfo need not be run. This
can save time, and more importantly, can help avoid forcing symbol completers.
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 have finished their processing of all compilation units before this phase starts