Merge pull request #54118 from Pineapple/dont-ignore-type-mismatch-in-setter-master

This commit is contained in:
Rémi Verschelde 2021-11-08 19:26:27 +01:00 committed by GitHub
commit 78ed2c05a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1257,6 +1257,8 @@ bool GDScriptInstance::set(const StringName &p_name, const Variant &p_value) {
call(member->setter, &val, 1, err);
if (err.error == Callable::CallError::CALL_OK) {
return true; //function exists, call was successful
} else {
return false;
}
} else {
if (member->data_type.has_type) {