class CtxLazy [ T ]

Utility class for lazy values whose evaluation depends on a context. This should be used whenever the evaluation of a lazy expression depends on some context, but the value can be re-used afterwards with a different context.

A typical use case is a lazy val in a phase object which exists once per root context where the expression intiializing the lazy val depends only on the root context, but not any changes afterwards.


CtxLazy ( expr: Context => T )


private val expr : Context => T
private var forced : Boolean
private var myValue : T
def apply ( ) ( implicit ctx: Context ) : T
private def forced_= ( x$1: Boolean ) : Unit
private def myValue_= ( x$1: T ) : Unit