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

[GDScript] Correctly report invalid read-only access #89648

Merged
merged 1 commit into from
May 1, 2024

Conversation

AThousandShips
Copy link
Member

@AThousandShips AThousandShips commented Mar 18, 2024

This ensures that read-only assignments are reported correctly, initially tried a fix using the setter system but it added a lot of extra complexity that wasn't helpful, so went with an explicit check on the script side using a new function on Variant, and added to a number of places in the VM, unsure if all these are needed but added them anywhere there was a set operation

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are largely whitespace changes as I put the read-only check first for convenience

Copy link
Member

@vnen vnen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'm just not sure if the error message is the most clear.

@AThousandShips
Copy link
Member Author

Any suggestions for a clearer one welcome, don't know what else to say with it

@akien-mga akien-mga merged commit c27d7a9 into godotengine:master May 1, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@AThousandShips AThousandShips deleted the read_only_check_2 branch May 2, 2024 07:31
@AThousandShips
Copy link
Member Author

Thank you!

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

Successfully merging this pull request may close these issues.

3 participants