Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kotlin deserialization name clash with enum variants and structs #91

Open
CerulanLumina opened this issue Apr 7, 2023 · 1 comment
Open
Assignees
Labels
question Further information is requested

Comments

@CerulanLumina
Copy link
Collaborator

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.

@CerulanLumina CerulanLumina added the question Further information is requested label Apr 7, 2023
@CerulanLumina CerulanLumina self-assigned this Apr 7, 2023
@snowsignal
Copy link
Contributor

This might be a duplicate of #48.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants