godot-kotlin-jvm icon indicating copy to clipboard operation
godot-kotlin-jvm copied to clipboard

Incorrect function registration warning on private class members

Open tomwyr opened this issue 3 years ago • 0 comments

Code analysis shows following warning when a private method is called, even though it's not visible to Godot (private2 in this case):

Overrides registered abstract function without registering itself. Without explicit @RegisterFunction annotation on overridden functions, they cannot be called from godot.
@RegisterClass
class Test : Node2D() {
    fun public1() {
        public2()
    }

    // Warning
    fun public2() {

    }

    private fun private1() {
        private2()
    }

    // Warning
    private fun private2() {

    }
}
  • the warning doesn't show up for private1 which doesn't get called
  • the warning shows up for public2 but not for public1 (I'm not sure if it's intended behavior for public members)

tomwyr avatar Jul 22 '22 14:07 tomwyr