diff options
Diffstat (limited to 'test/files/run/macro-invalidusage-partialapplication-with-tparams')
-rw-r--r-- | test/files/run/macro-invalidusage-partialapplication-with-tparams/Impls_Macros_1.scala | 6 | ||||
-rw-r--r-- | test/files/run/macro-invalidusage-partialapplication-with-tparams/Test_2.scala | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/test/files/run/macro-invalidusage-partialapplication-with-tparams/Impls_Macros_1.scala b/test/files/run/macro-invalidusage-partialapplication-with-tparams/Impls_Macros_1.scala index 4583a726cf..8b5c59bde8 100644 --- a/test/files/run/macro-invalidusage-partialapplication-with-tparams/Impls_Macros_1.scala +++ b/test/files/run/macro-invalidusage-partialapplication-with-tparams/Impls_Macros_1.scala @@ -1,9 +1,9 @@ -import scala.reflect.macros.{Context => Ctx} +import scala.reflect.macros.blackbox.Context object Impls { - def foo[T: c.WeakTypeTag](c: Ctx)(x: c.Expr[T]) = { + def foo[T: c.WeakTypeTag](c: Context)(x: c.Expr[T]) = { import c.universe._ - val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant(x.tree.toString)))) + val body = Apply(Select(Ident(definitions.PredefModule), TermName("println")), List(Literal(Constant(x.tree.toString)))) c.Expr[Unit](body) } } diff --git a/test/files/run/macro-invalidusage-partialapplication-with-tparams/Test_2.scala b/test/files/run/macro-invalidusage-partialapplication-with-tparams/Test_2.scala index e453d0b70c..9a34c62e0f 100644 --- a/test/files/run/macro-invalidusage-partialapplication-with-tparams/Test_2.scala +++ b/test/files/run/macro-invalidusage-partialapplication-with-tparams/Test_2.scala @@ -2,7 +2,7 @@ object Test extends App { import scala.reflect.runtime.universe._ import scala.reflect.runtime.{currentMirror => cm} import scala.tools.reflect.ToolBox - val tree = Select(Ident(newTermName("Macros")), newTermName("foo")) + val tree = Select(Ident(TermName("Macros")), TermName("foo")) try cm.mkToolBox().eval(tree) catch { case ex: Throwable => println(ex.getMessage) } } |