summaryrefslogtreecommitdiff
path: root/test/files/pos/t5744/Macros_1.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/t5744/Macros_1.scala')
-rw-r--r--test/files/pos/t5744/Macros_1.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/files/pos/t5744/Macros_1.scala b/test/files/pos/t5744/Macros_1.scala
index 288a88653d..0fc13c12d7 100644
--- a/test/files/pos/t5744/Macros_1.scala
+++ b/test/files/pos/t5744/Macros_1.scala
@@ -1,18 +1,18 @@
import scala.language.experimental.macros
-import scala.reflect.macros.Context
+import scala.reflect.macros.BlackboxContext
object Macros {
def foo[U: Numeric](x: U) = macro foo_impl[U]
def bar[U: Numeric : Equiv, Y <% String](x: U)(implicit s: String) = macro bar_impl[U, Y]
- def foo_impl[U](c: Context)(x: c.Expr[U])(numeric: c.Expr[Numeric[U]]) = {
+ def foo_impl[U](c: BlackboxContext)(x: c.Expr[U])(numeric: c.Expr[Numeric[U]]) = {
import c.universe._
val plusOne = Apply(Select(numeric.tree, newTermName("plus")), List(x.tree, Literal(Constant(1))))
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(plusOne))
c.Expr[Unit](body)
}
- def bar_impl[U, Y](c: Context)(x: c.Expr[U])(numeric: c.Expr[Numeric[U]], equiv: c.Expr[Equiv[U]], viewAsString: c.Expr[Y => String], s: c.Expr[String]) = {
+ def bar_impl[U, Y](c: BlackboxContext)(x: c.Expr[U])(numeric: c.Expr[Numeric[U]], equiv: c.Expr[Equiv[U]], viewAsString: c.Expr[Y => String], s: c.Expr[String]) = {
import c.universe._
val plusOne = Apply(Select(numeric.tree, newTermName("plus")), List(x.tree, Literal(Constant(1))))
val plusLen = Apply(Select(numeric.tree, newTermName("plus")), List(plusOne, Select(s.tree, newTermName("length"))))