Presence of (transient) delegated field in the serialized class breaks deserialization (#5103)
Do not include delegated field into generated constructor even though it might have backing field. Test that shows issue was added. Properties that are explicitly marked as delegated are now excluded. Fixes https://github.com/Kotlin/kotlinx.serialization/issues/2091
This commit is contained in:
+6
@@ -69,6 +69,12 @@ public class SerializationFirLightTreeBlackBoxTestGenerated extends AbstractSeri
|
||||
runTest("plugins/kotlinx-serialization/testData/boxIr/delegatedInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("delegatedProperty.kt")
|
||||
public void testDelegatedProperty() throws Exception {
|
||||
runTest("plugins/kotlinx-serialization/testData/boxIr/delegatedProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("enumsAreCached.kt")
|
||||
public void testEnumsAreCached() throws Exception {
|
||||
|
||||
+6
@@ -67,6 +67,12 @@ public class SerializationIrBoxTestGenerated extends AbstractSerializationIrBoxT
|
||||
runTest("plugins/kotlinx-serialization/testData/boxIr/delegatedInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("delegatedProperty.kt")
|
||||
public void testDelegatedProperty() throws Exception {
|
||||
runTest("plugins/kotlinx-serialization/testData/boxIr/delegatedProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("enumsAreCached.kt")
|
||||
public void testEnumsAreCached() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user