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/run/macro-undetparams-macroitself | |
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/run/macro-undetparams-macroitself')
-rw-r--r-- | test/files/run/macro-undetparams-macroitself/Impls_Macros_1.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/files/run/macro-undetparams-macroitself/Impls_Macros_1.scala b/test/files/run/macro-undetparams-macroitself/Impls_Macros_1.scala index 0244273b6f..85877b3f13 100644 --- a/test/files/run/macro-undetparams-macroitself/Impls_Macros_1.scala +++ b/test/files/run/macro-undetparams-macroitself/Impls_Macros_1.scala @@ -2,7 +2,10 @@ import scala.reflect.runtime.universe._ import scala.reflect.macros.Context object Macros { - def impl[T: c.WeakTypeTag](c: Context)(foo: c.Expr[T]): c.Expr[Unit] = c.universe.reify { println(c.literal(implicitly[c.WeakTypeTag[T]].toString).splice) } + def impl[T: c.WeakTypeTag](c: Context)(foo: c.Expr[T]): c.Expr[Unit] = { + import c.universe._ + reify { println(c.Expr[String](Literal(Constant(implicitly[c.WeakTypeTag[T]].toString))).splice) } + } def foo[T](foo: T) = macro impl[T] }
\ No newline at end of file |