Potentials

object Potentials
class Object
trait Matchable
class Any

Type members

Classlikes

case class Cold(source: Tree) extends Potential

The object whose initialization status is unknown

The object whose initialization status is unknown

case class FieldReturn(potential: Potential, field: Symbol)(source: Tree) extends Potential

The object pointed by this.f

The object pointed by this.f

case class Fun(potentials: Potentials, effects: Effects)(source: Tree) extends Potential

A function when called will produce the effects and return the potentials

A function when called will produce the effects and return the potentials

case class MethodReturn(potential: Potential, method: Symbol)(source: Tree) extends Potential

The object returned by this.m()

The object returned by this.m()

case class Outer(pot: Potential, classSymbol: ClassSymbol)(source: Tree) extends Potential

The Outer potential for classSymbol of the object pot

The Outer potential for classSymbol of the object pot

It's only used internally for expansion of potentials.

Note: Usage of Type.baseType(cls) may simplify the code. Current implementation avoids using complex type machinary, and may be potentially faster.

sealed trait Potential

A potential represents an aliasing of a value that is possibly under initialization

A potential represents an aliasing of a value that is possibly under initialization

sealed trait Refinable extends Potential
case class SuperRef(pot: Potential, supercls: ClassSymbol)(source: Tree) extends Potential

The object pointed by C.super.this, mainly used for override resolution

The object pointed by C.super.this, mainly used for override resolution

case class ThisRef(source: Tree) extends Refinable

The object pointed by this

The object pointed by this

case class Warm(classSymbol: ClassSymbol, outer: Potential)(source: Tree) extends Refinable

A warm potential represents an object of which all fields are initialized, but it may contain reference to objects under initialization.

A warm potential represents an object of which all fields are initialized, but it may contain reference to objects under initialization.

Value Params
classSymbol

The concrete class of the object

outer

The potential for this of the enclosing class

Value members

Concrete methods

def asSeenFrom(pot: Potential, thisValue: Potential)(env: Env): Potential
def asSeenFrom(pots: Potentials, thisValue: Potential)(env: Env): Potentials
def resolveOuter(cur: ClassSymbol, outerPots: Potentials, cls: ClassSymbol)(env: Env): Potentials
def show(pots: Potentials)(using Context): String

Concrete fields

Extensions

Extensions

extension (ps: Potentials)
def select(symbol: Symbol, source: Tree, ignoreSelectEffect: Boolean)(using Context): Summary

Selection on a set of potentials

Selection on a set of potentials

Value Params
ignoreSelectEffect

Where selection effects should be ignored During expansion of potentials, we ignore select effects and only care about promotion effects. This is because the selection effects have already been checked.

extension (ps: Potentials)
def promote(source: Tree): Effects