You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Fix LUA-style assignment in Dictionary
This commit is contained in:
@@ -239,7 +239,8 @@ void Variant::set_named(const StringName &p_member, const Variant &p_value, bool
|
|||||||
*v = p_value;
|
*v = p_value;
|
||||||
r_valid = true;
|
r_valid = true;
|
||||||
} else {
|
} else {
|
||||||
r_valid = false;
|
VariantGetInternalPtr<Dictionary>::get_ptr(this)->operator[](p_member) = p_value;
|
||||||
|
r_valid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
func test():
|
||||||
|
var dict = {}
|
||||||
|
dict.test = 1
|
||||||
|
print(dict.test)
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
GDTEST_OK
|
||||||
|
1
|
||||||
Reference in New Issue
Block a user