Correctly handle @Repeatable @SerialInfo annotations on classes

that were affected by deduplication of inherited serial info annotations.

Prohibit combination of @InheritableSerialInfo and @Repeatable.

Fixes https://github.com/Kotlin/kotlinx.serialization/issues/2099
This commit is contained in:
Leonid Startsev
2023-03-17 16:57:31 +01:00
committed by Space Team
parent 8b12b3f18d
commit 6ee20574e1
13 changed files with 125 additions and 4 deletions
@@ -159,6 +159,12 @@ public class SerializationFirLightTreeBlackBoxTestGenerated extends AbstractSeri
runTest("plugins/kotlinx-serialization/testData/boxIr/multipleGenericsPolymorphic.kt");
}
@Test
@TestMetadata("repeatableSerialInfo.kt")
public void testRepeatableSerialInfo() throws Exception {
runTest("plugins/kotlinx-serialization/testData/boxIr/repeatableSerialInfo.kt");
}
@Test
@TestMetadata("sealedInterfaces.kt")
public void testSealedInterfaces() throws Exception {
@@ -122,6 +122,12 @@ public class SerializationFirPsiDiagnosticTestGenerated extends AbstractSerializ
runTest("plugins/kotlinx-serialization/testData/diagnostics/ParamIsNotProperty.kt");
}
@Test
@TestMetadata("repeatableSerialInfo.kt")
public void testRepeatableSerialInfo() throws Exception {
runTest("plugins/kotlinx-serialization/testData/diagnostics/repeatableSerialInfo.kt");
}
@Test
@TestMetadata("SerializableEnums.kt")
public void testSerializableEnums() throws Exception {
@@ -157,6 +157,12 @@ public class SerializationIrBoxTestGenerated extends AbstractSerializationIrBoxT
runTest("plugins/kotlinx-serialization/testData/boxIr/multipleGenericsPolymorphic.kt");
}
@Test
@TestMetadata("repeatableSerialInfo.kt")
public void testRepeatableSerialInfo() throws Exception {
runTest("plugins/kotlinx-serialization/testData/boxIr/repeatableSerialInfo.kt");
}
@Test
@TestMetadata("sealedInterfaces.kt")
public void testSealedInterfaces() throws Exception {
@@ -120,6 +120,12 @@ public class SerializationPluginDiagnosticTestGenerated extends AbstractSerializ
runTest("plugins/kotlinx-serialization/testData/diagnostics/ParamIsNotProperty.kt");
}
@Test
@TestMetadata("repeatableSerialInfo.kt")
public void testRepeatableSerialInfo() throws Exception {
runTest("plugins/kotlinx-serialization/testData/diagnostics/repeatableSerialInfo.kt");
}
@Test
@TestMetadata("SerializableEnums.kt")
public void testSerializableEnums() throws Exception {