diff options
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t6394b.check | 1 | ||||
-rw-r--r-- | test/files/run/t6394b.flags | 1 | ||||
-rw-r--r-- | test/files/run/t6394b/Macros_1.scala | 12 | ||||
-rw-r--r-- | test/files/run/t6394b/Test_2.scala | 4 |
4 files changed, 18 insertions, 0 deletions
diff --git a/test/files/run/t6394b.check b/test/files/run/t6394b.check new file mode 100644 index 0000000000..34997f71e3 --- /dev/null +++ b/test/files/run/t6394b.check @@ -0,0 +1 @@ +TEST
diff --git a/test/files/run/t6394b.flags b/test/files/run/t6394b.flags new file mode 100644 index 0000000000..cd66464f2f --- /dev/null +++ b/test/files/run/t6394b.flags @@ -0,0 +1 @@ +-language:experimental.macros
\ No newline at end of file diff --git a/test/files/run/t6394b/Macros_1.scala b/test/files/run/t6394b/Macros_1.scala new file mode 100644 index 0000000000..5d93e1cda8 --- /dev/null +++ b/test/files/run/t6394b/Macros_1.scala @@ -0,0 +1,12 @@ +import scala.reflect.macros.Context + +object Macros { + def impl(c:Context): c.Expr[Any] = { + import c.universe._ + + val selfTree = This(tpnme.EMPTY) + c.Expr[AnyRef](selfTree) + } + + def foo: Any = macro impl +}
\ No newline at end of file diff --git a/test/files/run/t6394b/Test_2.scala b/test/files/run/t6394b/Test_2.scala new file mode 100644 index 0000000000..75e84f0e38 --- /dev/null +++ b/test/files/run/t6394b/Test_2.scala @@ -0,0 +1,4 @@ +object Test extends App { + println(Macros.foo) + override def toString = "TEST" +}
\ No newline at end of file |