-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
[3.x] Add type validations when setting basic type #53464
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The VisualScript fixes are good, but I'm not sure about the changes to Variant. It changes behavior as now it those functions will throw an error if the method doesn't exist, while previously they would handle it silently. Needs @godotengine/core review.
Also, #53456 should be checked against the |
core/variant_call.cpp
Outdated
if (!E) { | ||
return Vector<Variant::Type>(); | ||
} | ||
ERR_FAIL_COND_V(!E, Vector<Variant::Type>()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed this in a review meeting, the ERR_FAIL_INDEX_V
are good, but we're not confident that the change from if (!E)
to an error condition is good. There's a risk that these methods might actually be used with non-existing methods at times and the code expects it to return an empty/default value.
Since it's not part of the fix for the reported bug, it's probably best to leave this part alone (same in other methods, only validate p_type
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed changes.
71cb8d3
to
c58391c
Compare
Thanks! |
fixes #53456