Effects

object Effects
class Object
trait Matchable
class Any

Type members

Classlikes

sealed trait Effect

Effects that are related to safe initialization performed on potentials

Effects that are related to safe initialization performed on potentials

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

Field access, a.f

Field access, a.f

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

Method call, a.m()

Method call, a.m()

case class Promote(potential: Potential)(source: Tree) extends Effect

A promotion effect means that a value that's possibly under initialization is promoted from the initializing world to the fully-initialized world.

A promotion effect means that a value that's possibly under initialization is promoted from the initializing world to the fully-initialized world.

Essentially, this effect enforces that the object pointed to by potential is transitively initialized.

This effect is trigger in several scenarios:

  • a potential is used as arguments to method calls or new-expressions
  • a potential is assigned (not initialize) to a field
  • the selection chain on a potential is too long

Types

Value members

Concrete methods

def asSeenFrom(eff: Effect, thisValue: Potential)(implicit env: Env): Effect
def asSeenFrom(effs: Effects, thisValue: Potential)(implicit env: Env): Effects
def show(effs: Effects)(using Context): String

Concrete fields