summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2014-02-07 13:09:55 +0100
committerEugene Burmako <xeno.by@gmail.com>2014-02-07 13:09:55 +0100
commitb6326af94d255cb96b997680baec5ae38c4db4c7 (patch)
treec22dedadb5170ec3a211c2eae88313ddd0080d02 /test/files
parentf7870863c28d163d1016418783a1169fbd6022d0 (diff)
downloadscala-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 'test/files')
-rw-r--r--test/files/run/macro-reify-splice-outside-reify/Impls_Macros_1.scala2
-rw-r--r--test/files/run/t7240/Macros_1.scala2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/files/run/macro-reify-splice-outside-reify/Impls_Macros_1.scala b/test/files/run/macro-reify-splice-outside-reify/Impls_Macros_1.scala
index 624479480d..f038d8714f 100644
--- a/test/files/run/macro-reify-splice-outside-reify/Impls_Macros_1.scala
+++ b/test/files/run/macro-reify-splice-outside-reify/Impls_Macros_1.scala
@@ -3,7 +3,7 @@ import scala.reflect.macros.blackbox.Context
object Impls {
def foo(c: Context)(x: c.Expr[Int]) = {
import c.universe._
- val x1 = c.Expr[Int](c.resetAllAttrs(x.tree))
+ val x1 = c.Expr[Int](c.untypecheck(x.tree))
c.Expr[Int](Literal(Constant(c.eval(x1))))
}
}
diff --git a/test/files/run/t7240/Macros_1.scala b/test/files/run/t7240/Macros_1.scala
index 019ddf7cd6..c6e976038d 100644
--- a/test/files/run/t7240/Macros_1.scala
+++ b/test/files/run/t7240/Macros_1.scala
@@ -41,7 +41,7 @@ object Bakery {
def constructor = Apply(Select(New(Ident(newTypeName("eval"))), nme.CONSTRUCTOR), List())
c.eval(c.Expr[Any](
- c.resetAllAttrs(Block(composeDSL(Literal(Constant(1))), constructor))))
+ c.untypecheck(Block(composeDSL(Literal(Constant(1))), constructor))))
c.Expr[Any](Literal(Constant(1)))
}