You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a refinement of #26298, we should disable out of the box open polymorphic serialization for collections using something like:
// Pseudocode, not tested
fun hasPolymorphism(serializer: KSerializer<*>): Boolean = hasPolymorphism(serializer.descriptor)
fun hasPolymorphism(descriptor: SerialDescriptor): Boolean {
if (descriptor.kind == PolymorphicKind.OPEN.INSTANCE) return true
for (i in 0 until descriptor.elementsCount) {
// TODO circuit breaker for recursive types
if (hasPolymorphism(descriptor.getElementDescriptor(i)) return true
}
return false
}
The text was updated successfully, but these errors were encountered:
As a refinement of #26298, we should disable out of the box open polymorphic serialization for collections using something like:
The text was updated successfully, but these errors were encountered: