Handle @Serializable classes that implement interfaces by delegation

by filtering out delegated properties that end up in irClass.properties() list

Fixes https://github.com/Kotlin/kotlinx.serialization/issues/2157
This commit is contained in:
Leonid Startsev
2023-01-17 17:04:20 +01:00
committed by Space Team
parent 490970e65e
commit dc0cd61b6f
4 changed files with 38 additions and 2 deletions
@@ -57,6 +57,12 @@ public class SerializationFirBlackBoxTestGenerated extends AbstractSerialization
runTest("plugins/kotlinx-serialization/testData/boxIr/contextualFallback.kt");
}
@Test
@TestMetadata("delegatedInterface.kt")
public void testDelegatedInterface() throws Exception {
runTest("plugins/kotlinx-serialization/testData/boxIr/delegatedInterface.kt");
}
@Test
@TestMetadata("enumsAreCached.kt")
public void testEnumsAreCached() throws Exception {
@@ -55,6 +55,12 @@ public class SerializationIrBoxTestGenerated extends AbstractSerializationIrBoxT
runTest("plugins/kotlinx-serialization/testData/boxIr/contextualFallback.kt");
}
@Test
@TestMetadata("delegatedInterface.kt")
public void testDelegatedInterface() throws Exception {
runTest("plugins/kotlinx-serialization/testData/boxIr/delegatedInterface.kt");
}
@Test
@TestMetadata("enumsAreCached.kt")
public void testEnumsAreCached() throws Exception {