Do not create cacheableChildSerializers unless it is necessary
Creation of this property in the SerializerIrGenerator.<init> can lead to a 'Serializer not found' internal error when generator is applied to a fully-customized external serializer. In that case, generator is still created, but none of the generateSave/Load functions are called, so cacheableChildSerializers(Property) is not necessary. #KT-57730 Fixed Fixes https://github.com/Kotlin/kotlinx.serialization/issues/2260
This commit is contained in:
committed by
Space Team
parent
54c07f5ebb
commit
d9e16fb76e
+6
@@ -81,6 +81,12 @@ public class SerializationFirLightTreeBlackBoxTestGenerated extends AbstractSeri
|
||||
runTest("plugins/kotlinx-serialization/testData/boxIr/externalSerialierJava.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("externalSerializerForClassWithNonSerializableType.kt")
|
||||
public void testExternalSerializerForClassWithNonSerializableType() throws Exception {
|
||||
runTest("plugins/kotlinx-serialization/testData/boxIr/externalSerializerForClassWithNonSerializableType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("generatedClassifiersViaLibraryDependency.kt")
|
||||
public void testGeneratedClassifiersViaLibraryDependency() throws Exception {
|
||||
|
||||
+6
@@ -79,6 +79,12 @@ public class SerializationIrBoxTestGenerated extends AbstractSerializationIrBoxT
|
||||
runTest("plugins/kotlinx-serialization/testData/boxIr/externalSerialierJava.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("externalSerializerForClassWithNonSerializableType.kt")
|
||||
public void testExternalSerializerForClassWithNonSerializableType() throws Exception {
|
||||
runTest("plugins/kotlinx-serialization/testData/boxIr/externalSerializerForClassWithNonSerializableType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("generatedClassifiersViaLibraryDependency.kt")
|
||||
public void testGeneratedClassifiersViaLibraryDependency() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user