[AA FIR] FirLazyAnnotationTransformer: fix resolve contract violation

We can't reduce resolve to COMPILER_REQUIRED_ANNOTATIONS phase for
annotations with arguments, because currently they don't have
argument mapping

```stracktrace
org.jetbrains.kotlin.utils.KotlinExceptionWithAttachments: By now the annotations argument mapping should have been resolved
	at org.jetbrains.kotlin.analysis.api.fir.annotations.FirAnnotationUtilsKt.mapAnnotationParameters(firAnnotationUtils.kt:137)
	at org.jetbrains.kotlin.analysis.api.fir.FirUtilsKt.toKtAnnotationApplication(FirUtils.kt:79)
	at org.jetbrains.kotlin.analysis.api.fir.annotations.FirAnnotationUtilsKt.annotationsByClassId(firAnnotationUtils.kt:60)
	at org.jetbrains.kotlin.analysis.api.fir.annotations.FirAnnotationUtilsKt.annotationsByClassId$default(firAnnotationUtils.kt:46)
```

^KT-57424 Fixed
This commit is contained in:
Dmitrii Gridin
2023-03-20 15:05:30 +01:00
parent 9892a49c4b
commit c046bedfc2
7 changed files with 49 additions and 21 deletions
@@ -0,0 +1,5 @@
@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
@java.lang.annotation.Target(value = {java.lang.annotation.ElementType.PARAMETER})
@kotlin.annotation.Target(allowedTargets = {kotlin.annotation.AnnotationTarget.VALUE_PARAMETER})
public abstract @interface AnnotationClass /* AnnotationClass*/ {
}