[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:
@@ -0,0 +1,4 @@
|
||||
@kotlin.Deprecated(message = "", replaceWith = @ReplaceWith(expression = ""), level = kotlin.DeprecationLevel.ERROR)
|
||||
public final class MyClass /* MyClass*/ {
|
||||
public MyClass();// .ctor()
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// PSI: org.jetbrains.kotlin.light.classes.symbol.classes.SymbolLightClassForClassOrObject
|
||||
// EXPECTED: kotlin.Deprecated
|
||||
|
||||
@Deprecated("", ReplaceWith(""), level = DeprecationLevel.ERROR)
|
||||
class MyC<caret>lass
|
||||
+5
@@ -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*/ {
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// PSI: org.jetbrains.kotlin.light.classes.symbol.classes.SymbolLightClassForAnnotationClass
|
||||
// EXPECTED: kotlin.annotation.Target
|
||||
|
||||
@Target(AnnotationTarget.VALUE_PARAMETER)
|
||||
annotation class Annotatio<caret>nClass
|
||||
Reference in New Issue
Block a user