Hey all, I have a hierarchy of sealed classes, but...
# serialization
i
Hey all, I have a hierarchy of sealed classes, but when I attempt to serialize a member-class I get this error:
Copy code
Exception in thread "main" kotlin.TypeCastException: null cannot be cast to non-null type kotlinx.serialization.KSerializer<T>
	at kotlinx.serialization.SerializationKt.serializer(Serialization.kt:23)
	at uprizer.pentius.MainKt.main(main.kt:29)
The code that throws it is:
Copy code
println(Companion.stringify(Payment(Instant.now(), 15, 24, 0.12354)))
I have added
@Serializable
to the top-level sealed class. What am I doing wrong here?