[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
@@ -71,6 +71,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
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
@@ -71,6 +71,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
|
||||
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
@@ -71,6 +71,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
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
@@ -71,6 +71,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
|
||||
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