From 7b0f0a142bb526f4bd108a8c208ec9a8952398c9 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Mon, 4 Jun 2012 13:53:13 +0200 Subject: repairs the tests after the refactoring spree --- .../run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'test/files/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala') diff --git a/test/files/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala b/test/files/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala index cf34f1685d..32a8958577 100644 --- a/test/files/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala +++ b/test/files/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala @@ -3,15 +3,18 @@ //} object Test extends App { - import scala.reflect.mirror._ + import scala.reflect.runtime.universe._ + import scala.reflect.runtime.universe.Flag._ + import scala.reflect.runtime.{currentMirror => cm} + import scala.tools.reflect.ToolBox val macrobody = Select(Ident(newTermName("Impls")), newTermName("foo")) val macroparam = ValDef(NoMods, newTermName("x"), TypeTree(definitions.IntClass.asType), EmptyTree) - val macrodef = DefDef(Modifiers(Set(scala.reflect.api.Modifier.`macro`)), newTermName("foo"), Nil, List(List(macroparam)), TypeTree(), macrobody) + val macrodef = DefDef(Modifiers(MACRO), newTermName("foo"), Nil, List(List(macroparam)), TypeTree(), macrobody) val modulector = DefDef(NoMods, nme.CONSTRUCTOR, Nil, List(List()), TypeTree(), Block(Apply(Select(Super(This(EmptyTypeName), EmptyTypeName), nme.CONSTRUCTOR), List()))) val module = ModuleDef(NoMods, newTermName("Macros"), Template(Nil, emptyValDef, List(modulector, macrodef))) val macroapp = Apply(Select(Ident("Macros"), newTermName("foo")), List(Literal(Constant(42)))) val tree = Block(macrodef, module, macroapp) - val toolbox = mkToolBox(options = "-language:experimental.macros") + val toolbox = cm.mkToolBox(options = "-language:experimental.macros") println(toolbox.runExpr(tree)) } -- cgit v1.2.3