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

False-positive warning on CoreTypes value copy #604

Open
gabryon99 opened this issue Apr 10, 2024 · 0 comments
Open

False-positive warning on CoreTypes value copy #604

gabryon99 opened this issue Apr 10, 2024 · 0 comments
Assignees

Comments

@gabryon99
Copy link
Contributor

gabryon99 commented Apr 10, 2024

When creating a copy of property from a Godot CoreType, I get the following warning:

You're modifying a copy of a CoreType. Reassign it directly or use a core type modification helper. For more information, visit the documentation. This warning is experimental! If you encounter any false positives, please write an issue with a minimal reproduction project

This is the code that triggers the warning is the following:

@RegisterClass
class Simple : Node() {
    @Export
    @RegisterProperty
    lateinit var myNode: Node3D

    @RegisterFunction
    override fun _process(delta: Double) {
        val myNodeAngle = myNode.rotation.y // ⬅️ WARNING HERE!!!
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants