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