diff options
Diffstat (limited to 'test/files/run/macro-def-infer-return-type-b/Test_2.scala')
-rw-r--r-- | test/files/run/macro-def-infer-return-type-b/Test_2.scala | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/files/run/macro-def-infer-return-type-b/Test_2.scala b/test/files/run/macro-def-infer-return-type-b/Test_2.scala index f8f15b4224..0f84859545 100644 --- a/test/files/run/macro-def-infer-return-type-b/Test_2.scala +++ b/test/files/run/macro-def-infer-return-type-b/Test_2.scala @@ -1,6 +1,8 @@ object Test extends App { - import scala.reflect.mirror._ + import scala.reflect.runtime.universe._ + import scala.reflect.runtime.{currentMirror => cm} + import scala.tools.reflect.ToolBox val tree = Apply(Select(Ident("Macros"), newTermName("foo")), List(Literal(Constant(42)))) - try Expr(tree).eval + try cm.mkToolBox().runExpr(tree) catch { case ex: Throwable => println(ex.getMessage) } -}
\ No newline at end of file +} |