summaryrefslogtreecommitdiff
path: root/test/files/run/macro-toplevel-companion-b
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/macro-toplevel-companion-b')
-rw-r--r--test/files/run/macro-toplevel-companion-b/Impls_Macros_1.scala15
-rw-r--r--test/files/run/macro-toplevel-companion-b/Test_2.scala11
2 files changed, 0 insertions, 26 deletions
diff --git a/test/files/run/macro-toplevel-companion-b/Impls_Macros_1.scala b/test/files/run/macro-toplevel-companion-b/Impls_Macros_1.scala
deleted file mode 100644
index f30adc2965..0000000000
--- a/test/files/run/macro-toplevel-companion-b/Impls_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 Block(List(cdef: ClassDef), _) = reify{ class C }.tree
- val classRef = c.topLevelRef(TypeName("C")) orElse c.introduceTopLevel(nme.EMPTY_PACKAGE_NAME.toString, cdef)
- val Block(List(mdef: ModuleDef), _) = reify{ object C }.tree
- val moduleRef = c.topLevelRef(TermName("C")) orElse c.introduceTopLevel(nme.EMPTY_PACKAGE_NAME.toString, mdef)
- c.literalUnit
- }
-
- def foo = macro impl
-} \ No newline at end of file
diff --git a/test/files/run/macro-toplevel-companion-b/Test_2.scala b/test/files/run/macro-toplevel-companion-b/Test_2.scala
deleted file mode 100644
index 4e766bde89..0000000000
--- a/test/files/run/macro-toplevel-companion-b/Test_2.scala
+++ /dev/null
@@ -1,11 +0,0 @@
-import scala.reflect.runtime.universe._
-import scala.reflect.runtime.{universe => ru}
-import scala.reflect.runtime.{currentMirror => cm}
-import scala.tools.reflect.{ToolBox, ToolBoxError}
-import Macros._
-
-object Test extends App {
- val tb = cm.mkToolBox()
- try tb.compile(Select(Ident(TermName("Macros")), TermName("foo")))
- catch { case ToolBoxError(message, _) => println("""(Found in|and) .*?compileLateSynthetic-.*?\.scala""".r.replaceAllIn(message, m => m.group(1) + " <synthetic file name>")) }
-} \ No newline at end of file