summaryrefslogtreecommitdiff
path: root/test/pending/run/reify_newimpl_51.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/pending/run/reify_newimpl_51.scala')
-rw-r--r--test/pending/run/reify_newimpl_51.scala18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/pending/run/reify_newimpl_51.scala b/test/pending/run/reify_newimpl_51.scala
new file mode 100644
index 0000000000..f823bf4033
--- /dev/null
+++ b/test/pending/run/reify_newimpl_51.scala
@@ -0,0 +1,18 @@
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
+
+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
+ val bar = reify { println(x * y) }
+ bar.eval
+ println(x)
+ println(y)
+ }
+ code.eval
+ }
+} \ No newline at end of file