typeshare
typeshare copied to clipboard
Kotlin deserialization name clash with enum variants and structs
We keep running into situations where an enum variant in Rust is named the same as a struct. When these get run through typeshare, they both get translated into data class types in Kotlin. An enum variant becomes a data class variant of a sealed class, while a struct becomes a data class. As both are data classes, they both occupy the same namespace and make it impossible for the deserializer to disambiguate them.
This relates to the Kotlinx deserializer but we may be able to provide some relief from our end as well. More investigation needed.
This might be a duplicate of #48.