[FIR] Remove duplicate annotations from primary ctor params/properties
If an annotation doesn't specify an explicit use-site target, previously it was added to both, the primary constructor value parameter and the property in the FIR. Then, in FIR2IR, only the "correct" one was added to the IR. Move up the deduplication logic into the frontend. ^KT-56177 Fixed
This commit is contained in:
committed by
Space Team
parent
9268fd0e87
commit
eee66ab43f
+18
@@ -233,6 +233,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/annotations/javaPropertyWithIntInitializer.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaTargetOnPrimaryCtorParameter.kt")
|
||||
public void testJavaTargetOnPrimaryCtorParameter() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/annotations/javaTargetOnPrimaryCtorParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmAnnotationFlags.kt")
|
||||
public void testJvmAnnotationFlags() throws Exception {
|
||||
@@ -371,6 +377,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/annotations/syntheticMethodForProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("targetOnPrimaryCtorParameter.kt")
|
||||
public void testTargetOnPrimaryCtorParameter() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/annotations/targetOnPrimaryCtorParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("targetOnPrimaryCtorParameterMultiModule.kt")
|
||||
public void testTargetOnPrimaryCtorParameterMultiModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/annotations/targetOnPrimaryCtorParameterMultiModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeAnnotationOnJdk6.kt")
|
||||
public void testTypeAnnotationOnJdk6() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user