Open nesteiner opened 10 months ago
decodeFromString
is actually an inline function that takes a reified type parameter. As the type is lost at runtime this must be resolved at compile time. However it is just a shortcut to the version that takes an explicit serializer. As such you'll just need an actual serializer, probably as private/protected member (either in constructor or abstract val).
ok, I got it
hey, sorry to bother you guyes, I have a problem about using abstract base class to serialize
I have such sealed classes
I want to define a abstract base class
there are too many thing duplicated, so I want to define a abstract class so that I can write such code
but there is an error:
Cannot use 'T' as reified type parameter. Use a class instead.
how can I fix it