Provide more clear API around AnnotationChecker.applicableTargetSet

This commit is contained in:
Mikhail Glukhikh
2021-08-23 11:41:29 +03:00
committed by TeamCityServer
parent 19ab0ab2f8
commit 255eb87375
6 changed files with 14 additions and 10 deletions
@@ -297,7 +297,7 @@ public abstract class AnnotationCodegen {
Map<KotlinTarget, ElementType> annotationTargetMap = annotationTargetMaps.get(typeMapper.getJvmTarget());
if (annotationTargetMap == null) throw new AssertionError("No annotation target map for JVM target " + typeMapper.getJvmTarget());
Set<KotlinTarget> targets = AnnotationChecker.Companion.applicableTargetSet(classDescriptor);
Set<KotlinTarget> targets = AnnotationChecker.Companion.applicableTargetSetFromTargetAnnotationOrNull(classDescriptor);
Set<ElementType> javaTargets;
if (targets == null) {
javaTargets = getJavaTargetList(classDescriptor);