summaryrefslogtreecommitdiff
path: root/test/files/run/macro-reify-ref-to-packageless
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/macro-reify-ref-to-packageless')
-rw-r--r--test/files/run/macro-reify-ref-to-packageless/Impls_1.scala6
-rw-r--r--test/files/run/macro-reify-ref-to-packageless/Test_2.scala4
2 files changed, 10 insertions, 0 deletions
diff --git a/test/files/run/macro-reify-ref-to-packageless/Impls_1.scala b/test/files/run/macro-reify-ref-to-packageless/Impls_1.scala
new file mode 100644
index 0000000000..2f2d05678d
--- /dev/null
+++ b/test/files/run/macro-reify-ref-to-packageless/Impls_1.scala
@@ -0,0 +1,6 @@
+import scala.reflect.makro.{Context => Ctx}
+
+object Impls {
+ val `Answer to the Ultimate Question of Life, the Universe, and Everything` = 42
+ def foo(c: Ctx) = c.reify { `Answer to the Ultimate Question of Life, the Universe, and Everything` }
+}
diff --git a/test/files/run/macro-reify-ref-to-packageless/Test_2.scala b/test/files/run/macro-reify-ref-to-packageless/Test_2.scala
new file mode 100644
index 0000000000..9d475f756d
--- /dev/null
+++ b/test/files/run/macro-reify-ref-to-packageless/Test_2.scala
@@ -0,0 +1,4 @@
+object Test extends App {
+ def foo = macro Impls.foo
+ println(foo)
+} \ No newline at end of file