Promote

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.

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
trait Product
trait Equals
trait Effect
class Object
trait Matchable
class Any

Value members

Concrete methods

def show(using Context): String

Inherited methods

Inherited from
Product
Inherited from
Effect

Concrete fields

val source: Tree