From 07ff3a99b75174c4e4a4e52348b34aa0b68f51b1 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Wed, 15 Jan 2014 12:25:41 +0100 Subject: SI-8151 Remove -Yself-in-annots and associated implementation This experimental option typechecked arguments of annotations with an injected value in scope named `self`: @Foo(self.foo < 1) This has been slated for removal [1] for some time. This commit removes it in one fell swoop, without any attempt at source compatibility with code that constructs or pattern matches on AnnotatedType. [1] https://groups.google.com/d/msg/scala-internals/VdZ5UJwQFGI/C6tZ493Yxx4J --- src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala') diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index 95f2620061..330dc0434b 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -1431,7 +1431,7 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans private def checkTypeRefBounds(tp: Type, tree: Tree) = { var skipBounds = false tp match { - case AnnotatedType(ann :: Nil, underlying, selfSym) if ann.symbol == UncheckedBoundsClass => + case AnnotatedType(ann :: Nil, underlying) if ann.symbol == UncheckedBoundsClass => skipBounds = true underlying case TypeRef(pre, sym, args) => @@ -1474,7 +1474,7 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans } doTypeTraversal(tree) { - case tp @ AnnotatedType(annots, _, _) => + case tp @ AnnotatedType(annots, _) => applyChecks(annots) case tp => } -- cgit v1.2.3