diff options
Diffstat (limited to 'test/pending/run/macro-reify-tagless-b/Test_2.scala')
-rw-r--r-- | test/pending/run/macro-reify-tagless-b/Test_2.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/pending/run/macro-reify-tagless-b/Test_2.scala b/test/pending/run/macro-reify-tagless-b/Test_2.scala index 419ee42101..4649963d05 100644 --- a/test/pending/run/macro-reify-tagless-b/Test_2.scala +++ b/test/pending/run/macro-reify-tagless-b/Test_2.scala @@ -2,10 +2,12 @@ object Test extends App { //val list: List[String] = Macros.foo("hello world") //println(list) - import scala.reflect.mirror._ + import scala.reflect.runtime.universe._ + import scala.reflect.runtime.{currentMirror => cm} + import scala.tools.reflect.ToolBox val tpt = AppliedTypeTree(Ident(definitions.ListClass), List(Ident(definitions.StringClass))) val rhs = Apply(Select(Ident("Macros"), newTermName("foo")), List(Literal(Constant("hello world")))) val list = ValDef(NoMods, newTermName("list"), tpt, rhs) val tree = Block(list, Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Ident(list.name)))) - println(tree.eval) + println(cm.mkToolBox().runExpr(tree)) } |