Add support for wildcard types in Saving feature
Bluexin opened this issue ยท 3 comments
Trying to save any generic type using wildcard type (Java's ? extends X
or ? super X
and Kotlin's out X
and in X
) currently creates a FieldTypeError.
Java reflect stl represents them using instances of WildcardType
.
So the issue is that it crashes, not that you want to (de)serialize wildcard types? I suppose wildcards could be done with @Dyn
(sorry to whoever @DYN
is for the ping) as I don't believe it requires a serializer outside of the dynamic ones, but if anything tried to grab a wildcard serializer it would immediately fail to and crash.
In my specific use case the generic type is a final class, but in a kt List (which has out variance), however it could be useful to support dynamic for it.
I could make it serialize as the bound, or I think you could use @JvmSuppressWildcards