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
@@ -49,32 +43,6 @@ internal fun <T> FirebaseDecoder.decodeSerializableValuePolymorphic(
49
43
return actualDeserializer.deserialize(this)
50
44
}
51
45
52
-
53
-
//private fun validateIfSealed(
54
-
// serializer: SerializationStrategy<*>,
55
-
// actualSerializer: SerializationStrategy<Any>,
56
-
// classDiscriminator: String
57
-
//) {
58
-
// if (serializer !is SealedClassSerializer<*>) return
59
-
// @Suppress("DEPRECATION_ERROR")
60
-
// if (classDiscriminator in actualSerializer.descriptor.jsonCachedSerialNames()) {
61
-
// val baseName = serializer.descriptor.serialName
62
-
// val actualName = actualSerializer.descriptor.serialName
63
-
// error(
64
-
// "Sealed class '$actualName' cannot be serialized as base class '$baseName' because" +
65
-
// " it has property name that conflicts with class discriminator '$classDiscriminator'. " +
66
-
// "You can either change class discriminator with FirebaseClassDiscriminator annotation or " +
67
-
// "rename property with @SerialName annotation"
68
-
// )
69
-
// }
70
-
//}
71
-
72
-
//internal fun checkKind(kind: SerialKind) {
73
-
// if (kind is SerialKind.ENUM) error("Enums cannot be serialized polymorphically with 'type' parameter. You can use 'JsonBuilder.useArrayPolymorphism' instead")
74
-
// if (kind is PrimitiveKind) error("Primitives cannot be serialized polymorphically with 'type' parameter. You can use 'JsonBuilder.useArrayPolymorphism' instead")
75
-
// if (kind is PolymorphicKind) error("Actual serializer for polymorphic cannot be polymorphic itself")
0 commit comments