aboutsummaryrefslogtreecommitdiff
path: root/tests/disabled/macro/run/reify_newimpl_44.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/disabled/macro/run/reify_newimpl_44.scala')
-rw-r--r--tests/disabled/macro/run/reify_newimpl_44.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/disabled/macro/run/reify_newimpl_44.scala b/tests/disabled/macro/run/reify_newimpl_44.scala
new file mode 100644
index 000000000..736536cb3
--- /dev/null
+++ b/tests/disabled/macro/run/reify_newimpl_44.scala
@@ -0,0 +1,16 @@
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
+
+object Test extends dotty.runtime.LegacyApp {
+ {
+ 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
+ }
+}