From 7f1ba06f1313383fe60ce9bc6566afc78b3dae75 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 19 Nov 2012 14:50:29 -0800 Subject: Fix for SI-6687, wrong isVar logic. Fields which back lazy vals need to be excluded via !isLazy lest isVar return true. --- test/files/run/t6687.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/files/run/t6687.scala (limited to 'test') diff --git a/test/files/run/t6687.scala b/test/files/run/t6687.scala new file mode 100644 index 0000000000..ee44e5f0d2 --- /dev/null +++ b/test/files/run/t6687.scala @@ -0,0 +1,10 @@ +import scala.reflect.runtime.universe._ + +class A { lazy val x = 1 } + +object Test { + def main(args: Array[String]): Unit = { + val vars = typeOf[A].members.toList filter (x => x.isTerm && x.asTerm.isVar) + assert(vars.isEmpty, vars) + } +} -- cgit v1.2.3