diff options
Diffstat (limited to 'test/files/neg/macro-basic-mamdmi')
-rw-r--r-- | test/files/neg/macro-basic-mamdmi/Impls_Macros_Test_1.scala | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/test/files/neg/macro-basic-mamdmi/Impls_Macros_Test_1.scala b/test/files/neg/macro-basic-mamdmi/Impls_Macros_Test_1.scala index 908438cf65..325bb7276f 100644 --- a/test/files/neg/macro-basic-mamdmi/Impls_Macros_Test_1.scala +++ b/test/files/neg/macro-basic-mamdmi/Impls_Macros_Test_1.scala @@ -1,22 +1,19 @@ -import scala.reflect.macros.{Context => Ctx} +import scala.reflect.macros.blackbox.Context object Impls { - def foo(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = { + def foo(c: Context)(x: c.Expr[Int]): c.Expr[Int] = { import c.universe._ - val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1)))) - c.Expr[Int](body) + c.Expr[Int](q"$x + 1") } - def bar(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = { + def bar(c: Context)(x: c.Expr[Int]): c.Expr[Int] = { import c.universe._ - val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2)))) - c.Expr[Int](body) + c.Expr[Int](q"$x + 2") } - def quux(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = { + def quux(c: Context)(x: c.Expr[Int]): c.Expr[Int] = { import c.universe._ - val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3)))) - c.Expr[Int](body) + c.Expr[Int](q"$x + 3") } } |