diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-02-07 13:09:55 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-02-07 13:09:55 +0100 |
commit | b6326af94d255cb96b997680baec5ae38c4db4c7 (patch) | |
tree | c22dedadb5170ec3a211c2eae88313ddd0080d02 /src/reflect/scala/reflect/macros/Evals.scala | |
parent | f7870863c28d163d1016418783a1169fbd6022d0 (diff) | |
download | scala-b6326af94d255cb96b997680baec5ae38c4db4c7.tar.gz scala-b6326af94d255cb96b997680baec5ae38c4db4c7.tar.bz2 scala-b6326af94d255cb96b997680baec5ae38c4db4c7.zip |
further limits discoverability of resetAttrs
This commit removes resetAllAttrs from the public reflection API.
This method was previously deprecated, but on a second thought that
doesn't do it justice. People should be aware that resetAllAttrs is just
wrong, and if they have code that uses it, this code should be rewritten
immediately without beating around the bush with deprecations. There's
a source-compatible way of achieving that (resetLocalAttrs), so that
shouldn't bring much trouble.
Secondly, resetAllAttrs in compiler internals becomes deprecated. In subsequent
commits I'm going to rewrite the only two locations in the compiler that
uses it, and then I think we can remove it from the compiler as well.
Diffstat (limited to 'src/reflect/scala/reflect/macros/Evals.scala')
-rw-r--r-- | src/reflect/scala/reflect/macros/Evals.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/reflect/scala/reflect/macros/Evals.scala b/src/reflect/scala/reflect/macros/Evals.scala index 222ae43d79..68e07dd319 100644 --- a/src/reflect/scala/reflect/macros/Evals.scala +++ b/src/reflect/scala/reflect/macros/Evals.scala @@ -17,13 +17,13 @@ trait Evals { * permitted by the shape of the arguments. * * Known issues: because of [[https://issues.scala-lang.org/browse/SI-5748 https://issues.scala-lang.org/browse/SI-5748]] - * trees being evaluated first need to undergo `resetAllAttrs`. Resetting symbols and types + * trees being evaluated first need to undergo `untypecheck`. Resetting symbols and types * mutates the tree in place, therefore the conventional approach is to `duplicate` the tree first. * * {{{ * scala> def impl(c: Context)(x: c.Expr[String]) = { - * | val x1 = c.Expr[String](c.resetAllAttrs(x.tree.duplicate)) - * | println(s"compile-time value is: \${c.eval(x1)}") + * | val x1 = c.Expr[String](c.untypecheck(x.tree.duplicate)) + * | println(s"compile-time value is: ${c.eval(x1)}") * | x * | } * impl: (c: Context)(x: c.Expr[String])c.Expr[String] |