-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
It has to exclude .isLazy or you pick up unwanted hijackers. (This is what one reaps when reusing bits for ad-hoc encoding schemes.)
scala> import scala.reflect.runtime.universe._
import scala.reflect.runtime.universe._
scala> class A { lazy val x = 1 }
defined class A
scala> typeOf[A].members.toList filter (x => x.isTerm && x.asTerm.isVar)
res0: List[reflect.runtime.universe.Symbol] = List(lazy value x)