summaryrefslogtreecommitdiff
path: root/test/files/run/macro-toplevel/Macros_1.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/macro-toplevel/Macros_1.scala')
-rw-r--r--test/files/run/macro-toplevel/Macros_1.scala15
1 files changed, 0 insertions, 15 deletions
diff --git a/test/files/run/macro-toplevel/Macros_1.scala b/test/files/run/macro-toplevel/Macros_1.scala
deleted file mode 100644
index f681c86735..0000000000
--- a/test/files/run/macro-toplevel/Macros_1.scala
+++ /dev/null
@@ -1,15 +0,0 @@
-import scala.reflect.macros.Context
-import language.experimental.macros
-
-object Macros {
- def impl(c: Context) = {
- import c.universe._
- val msg = "I've been created from " + c.macroApplication
- val Block(List(synthetic: ClassDef), _) = reify{ class SomeUniqueName { def hello = c.literal(msg).splice } }.tree
- val ref = c.topLevelRef(synthetic.name) orElse c.introduceTopLevel(nme.EMPTY_PACKAGE_NAME.toString, synthetic)
- c.Expr[String](Select(Apply(Select(New(ref), nme.CONSTRUCTOR), List()), TermName("hello")))
- }
-
- def foo = macro impl
- def foo2 = macro impl
-}