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 2.0] Fix Variant::toGodot call after KT-68339 is fixed #643

Open
chippmann opened this issue May 26, 2024 · 1 comment
Open

[Kotlin 2.0] Fix Variant::toGodot call after KT-68339 is fixed #643

chippmann opened this issue May 26, 2024 · 1 comment

Comments

@chippmann
Copy link
Contributor

In Kotlin 2.0 there is a bug with enum initialization order which gives false positives in our Variant::toGodot call. See: https://youtrack.jetbrains.com/issue/KT-68339

After https://youtrack.jetbrains.com/issue/KT-68339 is fixed, we need to undo the corresponding change made in #641

@CedNaru
Copy link
Member

CedNaru commented May 26, 2024

I'll add that we can use the opportunity to rework the whole Variant.kt file.
This is way more complex than it should be. We created it when we weren't sure of how Godot was behaving.
For example, we check the null value for everything variant type, when it can only happen for the OBJECT type.
We also have things like those composite types (JVM_INT) that are not part of the original Godot variant and at the time were used by the API gen, which is no longer necessary now that it handles the casting itself (we will probably require changes in the entry gen)

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

No branches or pull requests

2 participants