summaryrefslogtreecommitdiff
path: root/src/reflect
diff options
context:
space:
mode:
authorGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2014-03-26 12:39:24 +0100
committerGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2014-03-26 12:39:24 +0100
commitc74e1325ff1514b1042c959b0b268b3c6bf8d349 (patch)
tree3ac99232469e17ff0d69113ce2ff2fbc59ab6050 /src/reflect
parent2af68eec522c97af14b8fad372fc3c0addf7d604 (diff)
parent8262ed2fc618d27258eb975fd401b31f1064cc3e (diff)
downloadscala-c74e1325ff1514b1042c959b0b268b3c6bf8d349.tar.gz
scala-c74e1325ff1514b1042c959b0b268b3c6bf8d349.tar.bz2
scala-c74e1325ff1514b1042c959b0b268b3c6bf8d349.zip
Merge pull request #3655 from retronym/ticket/8442
SI-8442 Ignore stub annotation symbols in `AnnotationInfo#matches`
Diffstat (limited to 'src/reflect')
-rw-r--r--src/reflect/scala/reflect/internal/AnnotationInfos.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/internal/AnnotationInfos.scala b/src/reflect/scala/reflect/internal/AnnotationInfos.scala
index 032b45316e..80b6b16d0a 100644
--- a/src/reflect/scala/reflect/internal/AnnotationInfos.scala
+++ b/src/reflect/scala/reflect/internal/AnnotationInfos.scala
@@ -292,7 +292,7 @@ trait AnnotationInfos extends api.Annotations { self: SymbolTable =>
*/
def defaultTargets = symbol.annotations map (_.symbol) filter isMetaAnnotation
// Test whether the typeSymbol of atp conforms to the given class.
- def matches(clazz: Symbol) = symbol isNonBottomSubClass clazz
+ def matches(clazz: Symbol) = !symbol.isInstanceOf[StubSymbol] && (symbol isNonBottomSubClass clazz)
// All subtrees of all args are considered.
def hasArgWhich(p: Tree => Boolean) = args exists (_ exists p)