diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2013-10-17 19:12:59 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-10-18 16:58:51 +0200 |
commit | 3b4dc75710ac51de729224929690422d1b44e3ad (patch) | |
tree | 27337cd2a0a66e98650488a5cbff4e4dcb499745 /test/files/pos | |
parent | 54707cb45018170e31eb188a9a694ab9b0728f71 (diff) | |
download | scala-3b4dc75710ac51de729224929690422d1b44e3ad.tar.gz scala-3b4dc75710ac51de729224929690422d1b44e3ad.tar.bz2 scala-3b4dc75710ac51de729224929690422d1b44e3ad.zip |
deprecates raw tree manipulation facilities in macros.Context
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/annotated-treecopy/Impls_Macros_1.scala | 6 | ||||
-rw-r--r-- | test/files/pos/t5692a/Macros_1.scala | 2 | ||||
-rw-r--r-- | test/files/pos/t5692b/Macros_1.scala | 2 | ||||
-rw-r--r-- | test/files/pos/t7461/Macros_1.scala | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/test/files/pos/annotated-treecopy/Impls_Macros_1.scala b/test/files/pos/annotated-treecopy/Impls_Macros_1.scala index ecf8916c46..407d0b4bf3 100644 --- a/test/files/pos/annotated-treecopy/Impls_Macros_1.scala +++ b/test/files/pos/annotated-treecopy/Impls_Macros_1.scala @@ -38,10 +38,10 @@ object Macros { val reifiedExpr = c.Expr[scala.reflect.runtime.universe.Expr[T => U]](reifiedTree) val template = c.universe.reify(new (T => U) with TypedFunction { - override def toString = c.literal(tp+" => "+ttag.tpe+" { "+b1.toString+" } ").splice // DEBUG + override def toString = c.Expr[String](Literal(Constant(tp+" => "+ttag.tpe+" { "+b1.toString+" } "))).splice // DEBUG def tree = reifiedExpr.splice.tree - val typeIn = c.literal(tp.toString).splice - val typeOut = c.literal(ttag.tpe.toString).splice + val typeIn = c.Expr[String](Literal(Constant((tp.toString)))).splice + val typeOut = c.Expr[String](Literal(Constant((ttag.tpe.toString)))).splice def apply(_arg: T): U = c.Expr[U](b1)(ttag.asInstanceOf[c.WeakTypeTag[U]]).splice }) val untyped = c.resetLocalAttrs(template.tree) diff --git a/test/files/pos/t5692a/Macros_1.scala b/test/files/pos/t5692a/Macros_1.scala index 06b5a3de36..fa3a0bcf32 100644 --- a/test/files/pos/t5692a/Macros_1.scala +++ b/test/files/pos/t5692a/Macros_1.scala @@ -1,6 +1,6 @@ import scala.reflect.macros.Context object Macros { - def impl[T](c: Context) = c.literalUnit + def impl[T](c: Context) = { import c.universe._; c.Expr[Unit](Literal(Constant(()))) } def foo[T] = macro impl[T] }
\ No newline at end of file diff --git a/test/files/pos/t5692b/Macros_1.scala b/test/files/pos/t5692b/Macros_1.scala index b28d19f903..12108cfefa 100644 --- a/test/files/pos/t5692b/Macros_1.scala +++ b/test/files/pos/t5692b/Macros_1.scala @@ -1,6 +1,6 @@ import scala.reflect.macros.Context object Macros { - def impl[T, U](c: Context) = c.literalUnit + def impl[T, U](c: Context) = { import c.universe._; c.Expr[Unit](Literal(Constant(()))) } def foo[T, U] = macro impl[T, U] }
\ No newline at end of file diff --git a/test/files/pos/t7461/Macros_1.scala b/test/files/pos/t7461/Macros_1.scala index 353dec66d7..fdaf33e8c8 100644 --- a/test/files/pos/t7461/Macros_1.scala +++ b/test/files/pos/t7461/Macros_1.scala @@ -6,7 +6,7 @@ object Macros { import c.universe._ val wut = c.typeCheck(Select(Literal(Constant(10)), newTermName("$minus")), silent = true) // println(showRaw(wut, printIds = true, printTypes = true)) - c.literalUnit + c.Expr[Unit](Literal(Constant(()))) } def foo = macro impl |