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
@@ -25,4 +25,4 @@ object URLSerializer : KSerializer<URL> {
|
||||
fun box(): String {
|
||||
if (URLSerializer.descriptor.toString() != "PrimitiveDescriptor(java.net.URL)") return URLSerializer.descriptor.toString()
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user