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 /src/compiler/scala/reflect/macros | |
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 'src/compiler/scala/reflect/macros')
-rw-r--r-- | src/compiler/scala/reflect/macros/contexts/Typers.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/scala/reflect/macros/contexts/Typers.scala b/src/compiler/scala/reflect/macros/contexts/Typers.scala index 85204d0f1b..cd3db74016 100644 --- a/src/compiler/scala/reflect/macros/contexts/Typers.scala +++ b/src/compiler/scala/reflect/macros/contexts/Typers.scala @@ -49,4 +49,6 @@ trait Typers { def resetAllAttrs(tree: Tree): Tree = universe.resetAllAttrs(universe.duplicateAndKeepPositions(tree)) def resetLocalAttrs(tree: Tree): Tree = universe.resetLocalAttrs(universe.duplicateAndKeepPositions(tree)) + + def untypecheck(tree: Tree): Tree = universe.resetLocalAttrs(universe.duplicateAndKeepPositions(tree)) } |