rocketraman
08/02/2024, 5:00 PMSerializersModule
to define the subclasses for the open polymorphic interface via delegation to the sealed class, rather than listing all of the sealed classes subclasses explicitly (which the compiler will not check is exhaustive)? More in 🧵 .rocketraman
08/02/2024, 5:02 PMpolymorphic(MyOpenInterface::class) {
subclass(MySealed::class)
}
but that fails with:
Serializer for MySealed can't be registered as a subclass for polymorphic serialization because its kind SEALED is not concrete. To work with multiple hierarchies, register it as a base class.
but I'm not sure how to do that.rocketraman
08/14/2024, 6:39 PM