diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-01-10 01:36:06 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-01-21 12:24:51 +0300 |
commit | 752f1eb63e931e04fd2818f32b6ca7e68e4298d2 (patch) | |
tree | 4101e34d71d3e8393d959de6fff7717d983747f7 /test/files/run/t6187.scala | |
parent | 97286d761a5eaf18cc7018aa162866232a87ed91 (diff) | |
download | scala-752f1eb63e931e04fd2818f32b6ca7e68e4298d2.tar.gz scala-752f1eb63e931e04fd2818f32b6ca7e68e4298d2.tar.bz2 scala-752f1eb63e931e04fd2818f32b6ca7e68e4298d2.zip |
deprecates resetAllAttrs and resetLocalAttrs in favor of the new API
We now have c.untypecheck, which is supposed to be a counterpart of c.typecheck
in the sense that it goes back from typed trees to untyped ones:
http://stackoverflow.com/questions/20936509/scala-macros-what-is-the-difference-between-typed-aka-typechecked-an-untyped.
Let’s hope that c.untypecheck will soon be able to solve our problems
with partially/incorrectly attributed trees emitted by macros:
https://groups.google.com/forum/#!topic/scala-internals/TtCTPlj_qcQ.
Diffstat (limited to 'test/files/run/t6187.scala')
-rw-r--r-- | test/files/run/t6187.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/files/run/t6187.scala b/test/files/run/t6187.scala index fc6fa6e9a7..18f8f7ea2b 100644 --- a/test/files/run/t6187.scala +++ b/test/files/run/t6187.scala @@ -5,7 +5,7 @@ object Test extends ReplTest { import language.experimental.macros, reflect.macros.BlackboxContext def macroImpl[T: c.WeakTypeTag](c: BlackboxContext)(t: c.Expr[T]): c.Expr[List[T]] = { val r = c.universe.reify { List(t.splice) } - c.Expr[List[T]]( c.resetLocalAttrs(r.tree) ) + c.Expr[List[T]]( c.untypecheck(r.tree) ) } def demo[T](t: T): List[T] = macro macroImpl[T] def m[T](t: T): List[List[T]] = |