Support preference of TYPE_USE annotations to enhance over others like METHOD, FIELD and VALUE_PARAMETER to avoid double applying them in case of arrays: @NotNull Integer [] (both to the array element and to the entire array)

^KT-24392 Fixed
This commit is contained in:
Victor Petukhov
2020-12-08 18:32:33 +03:00
parent 69f31afecc
commit 857cc92326
8 changed files with 83 additions and 47 deletions
@@ -14,8 +14,8 @@ object SpecialJvmAnnotations {
JvmAnnotationNames.METADATA_FQ_NAME,
JvmAnnotationNames.JETBRAINS_NOT_NULL_ANNOTATION,
JvmAnnotationNames.JETBRAINS_NULLABLE_ANNOTATION,
FqName("java.lang.annotation.Target"),
FqName("java.lang.annotation.Retention"),
FqName("java.lang.annotation.Documented")
JvmAnnotationNames.TARGET_ANNOTATION,
JvmAnnotationNames.RETENTION_ANNOTATION,
JvmAnnotationNames.DOCUMENTED_ANNOTATION
).mapTo(mutableSetOf(), ClassId::topLevel)
}