Open chippmann opened 1 month ago
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)
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-68339After https://youtrack.jetbrains.com/issue/KT-68339 is fixed, we need to undo the corresponding change made in https://github.com/utopia-rise/godot-kotlin-jvm/pull/641