Don't add unapplicable targeted annotations to the container
For example, previously on an (incorrect) code like
@setparam:Ann
val x = 42
We added Ann to x's annotations. Not doing this seems more correct and
simplifies implementation a bit.
Test data is NOT changed in this commit because effective changes
somewhat depend on the changes in the subsequent commits. Affected tests
are at compiler/testData/diagnostics/tests/annotations/withUseSiteTarget
This commit is contained in:
+1
-3
@@ -97,8 +97,6 @@ class AnnotationSplitter(
|
||||
if (useSiteTarget != null) {
|
||||
if (useSiteTarget in applicableTargets)
|
||||
map.getOrPut(useSiteTarget, { arrayListOf() }).add(annotationWithTarget)
|
||||
else
|
||||
other.add(annotationWithTarget)
|
||||
|
||||
continue@outer
|
||||
}
|
||||
@@ -154,4 +152,4 @@ class AnnotationSplitter(
|
||||
override fun toString() = annotations.toString()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user