From 5cc8f83c681ded7367dc5112f6f9042e9526facf Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Sat, 11 Jan 2014 23:41:31 +0100 Subject: *boxContext => *box.Context , *boxMacro => *box.Macro Performs the following renamings: * scala.reflect.macros.BlackboxContext to scala.reflect.macros.blackbox.Context * scala.reflect.macros.BlackboxMacro to scala.reflect.macros.blackbox.Macro * scala.reflect.macros.WhiteboxContext to scala.reflect.macros.whitebox.Context * scala.reflect.macros.WhiteboxMacro to scala.reflect.macros.whitebox.Macro https://groups.google.com/forum/#!topic/scala-internals/MX40-dM28rk --- test/files/pos/t5744/Macros_1.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/files/pos/t5744') diff --git a/test/files/pos/t5744/Macros_1.scala b/test/files/pos/t5744/Macros_1.scala index 0fc13c12d7..6e2bf4825b 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.BlackboxContext +import scala.reflect.macros.blackbox.Context 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: BlackboxContext)(x: c.Expr[U])(numeric: c.Expr[Numeric[U]]) = { + def foo_impl[U](c: Context)(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: BlackboxContext)(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: Context)(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")))) -- cgit v1.2.3