summaryrefslogtreecommitdiff
path: root/test/files/run/reify_newimpl_44.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/reify_newimpl_44.scala')
-rw-r--r--test/files/run/reify_newimpl_44.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/run/reify_newimpl_44.scala b/test/files/run/reify_newimpl_44.scala
new file mode 100644
index 0000000000..962461db8b
--- /dev/null
+++ b/test/files/run/reify_newimpl_44.scala
@@ -0,0 +1,15 @@
+import scala.reflect.mirror._
+
+object Test extends App {
+ {
+ var counter = 0
+ lazy val x = { counter += 1; counter }
+ lazy val y = { counter += 1; counter }
+ val code = reify {
+ def foo = y // ensures that y is the first freevar we find
+ println(x)
+ println(y)
+ }
+ code.eval
+ }
+} \ No newline at end of file