Skip to content

isVar logic is wrong #6687

@scabug

Description

@scabug

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)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions