Setup

dotty.tools.dotc.cc.Setup
See theSetup companion object
class Setup(preRecheckPhase: DenotTransformer, thisPhase: DenotTransformer, recheckDef: (ValOrDefDef, Symbol) => Context ?=> Unit) extends TreeTraverser

A tree traverser that prepares a compilation unit to be capture checked. It does the following:

  • For every inferred type, drop any retains annotations, add capture sets to all its parts, add refinements to class types and function types. (c.f. mapInferred)
  • For explicit capturing types, expand throws aliases to the underlying (pure) function, and add some implied capture sets to curried functions (c.f. expandThrowsAlias, expandAbbreviations).
  • Add capture sets to self types of classes and objects, unless the self type was written explicitly.
  • Box the types of mutable variables and type arguments to methods (type arguments of types are boxed on access).
  • Link the external types of val and def symbols with the inferred types based on their parameter symbols.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def apply(tree: Tree)(using Context): Unit
def traverse(tree: Tree)(using Context): Unit

Inherited methods

def apply(x: Unit, tree: Tree)(using Context): Unit

Attributes

Inherited from:
TreeTraverser
def apply(x: Unit, trees: List[Tree])(using Context): X

Attributes

Inherited from:
TreeAccumulator
def foldMoreCases(x: Unit, tree: Tree)(using Context): X

Attributes

Inherited from:
TreeAccumulator
def foldOver(x: Unit, tree: Tree)(using Context): X

Attributes

Inherited from:
TreeAccumulator
def traverse(trees: List[Tree])(using Context): Unit

Attributes

Inherited from:
TreeTraverser
protected def traverseChildren(tree: Tree)(using Context): Unit

Attributes

Inherited from:
TreeTraverser