Dotty Documentation


class ByNameClosures
extends TransformByNameApply with IdentityDenotTransformer

This phase translates arguments to call-by-name parameters, using the rules

x           ==>    x                  if x is a => parameter
e.apply()   ==>    <cbn-arg>(e)       if e is pure
e           ==>    <cbn-arg>(() => e) for all other arguments


: [T](() => T): T

is a synthetic method defined in Definitions. Erasure will later strip the wrappers.

[-] Constructors

ByNameClosures ( )

[-] Members

[+] override def mkByNameClosure ( arg: Tree , argType: Type ) ( implicit ctx: Context ) : Tree
[+] 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