[K2] Support serialization of complex annotations

#KT-57611 Fixed
This commit is contained in:
Ivan Kylchik
2023-03-31 17:52:07 +02:00
committed by Space Team
parent 4a50bd9b16
commit ac480e2285
17 changed files with 328 additions and 11 deletions
@@ -1,3 +1,5 @@
// KT-57135 K2 dosen't take into account `field` target on annotation for property
// MUTED_WHEN: K2
package test
annotation class AnnoClass
@@ -1,3 +1,5 @@
// KT-57135 K2 dosen't take into account `field` target on annotation for property
// MUTED_WHEN: K2
package test
annotation class Ann
@@ -24376,11 +24376,29 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/serialization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("annotationInArguments.kt")
public void testAnnotationInArguments() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationInArguments.kt");
}
@Test
@TestMetadata("annotationSerialization.kt")
public void testAnnotationSerialization() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationSerialization.kt");
}
@Test
@TestMetadata("annotationWithArray.kt")
public void testAnnotationWithArray() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithArray.kt");
}
@Test
@TestMetadata("annotationWithDefaults.kt")
public void testAnnotationWithDefaults() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithDefaults.kt");
}
}
}
@@ -24140,11 +24140,29 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/serialization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("annotationInArguments.kt")
public void testAnnotationInArguments() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationInArguments.kt");
}
@Test
@TestMetadata("annotationSerialization.kt")
public void testAnnotationSerialization() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationSerialization.kt");
}
@Test
@TestMetadata("annotationWithArray.kt")
public void testAnnotationWithArray() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithArray.kt");
}
@Test
@TestMetadata("annotationWithDefaults.kt")
public void testAnnotationWithDefaults() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithDefaults.kt");
}
}
}