diff options
Diffstat (limited to 'test/files/run/t8425')
-rw-r--r-- | test/files/run/t8425/Macros_1.scala | 12 | ||||
-rw-r--r-- | test/files/run/t8425/Test_2.scala | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/test/files/run/t8425/Macros_1.scala b/test/files/run/t8425/Macros_1.scala new file mode 100644 index 0000000000..71a96518e8 --- /dev/null +++ b/test/files/run/t8425/Macros_1.scala @@ -0,0 +1,12 @@ +import scala.language.experimental.macros +import scala.reflect.macros.blackbox.Context + +object Macros { + def foo: Unit = macro impl + def impl(c: Context) = { + import c.universe._ + val test1 = c.freshName() + val test2 = c.freshName("$") + q"println(List($test1, $test2))" + } +}
\ No newline at end of file diff --git a/test/files/run/t8425/Test_2.scala b/test/files/run/t8425/Test_2.scala new file mode 100644 index 0000000000..acfddae942 --- /dev/null +++ b/test/files/run/t8425/Test_2.scala @@ -0,0 +1,3 @@ +object Test extends App { + Macros.foo +}
\ No newline at end of file |