[FIR2IR] Fix infinite loop between annotation and annotation parameter
When an annotation constructor value parameter is annotated with the very same annotation, FIR2IR went in an infinite loop when trying to generate it. To fix this, the constructor is added to the Fir2IrDeclarationStorage cache before generating the value parameters. To accommodate for the missing parameters, the value arguments count is determined using the FIR.
This commit is contained in:
committed by
Space Team
parent
fc75402f65
commit
d1ce55cbd2
+6
@@ -82,6 +82,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
|
||||
runTest("compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("selfReferentialAnnotation.kt")
|
||||
public void testSelfReferentialAnnotation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/annotations/selfReferentialAnnotation.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/annotations/annotatedLambda")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+6
@@ -88,6 +88,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
|
||||
runTest("compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("selfReferentialAnnotation.kt")
|
||||
public void testSelfReferentialAnnotation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/annotations/selfReferentialAnnotation.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/annotations/annotatedLambda")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+6
@@ -80,6 +80,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
||||
runTest("compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("selfReferentialAnnotation.kt")
|
||||
public void testSelfReferentialAnnotation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/annotations/selfReferentialAnnotation.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/annotations/annotatedLambda")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+6
@@ -83,6 +83,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
|
||||
runTest("compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("selfReferentialAnnotation.kt")
|
||||
public void testSelfReferentialAnnotation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/annotations/selfReferentialAnnotation.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/annotations/annotatedLambda")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
Reference in New Issue
Block a user