Fix LUA-style assignment in Dictionary

This commit is contained in:
kobewi 2021-10-05 02:48:33 +02:00
parent 2e8cba0bd9
commit 9e5fdbc79d
3 changed files with 8 additions and 1 deletions

View file

@ -239,7 +239,8 @@ void Variant::set_named(const StringName &p_member, const Variant &p_value, bool
*v = p_value;
r_valid = true;
} else {
r_valid = false;
VariantGetInternalPtr<Dictionary>::get_ptr(this)->operator[](p_member) = p_value;
r_valid = true;
}
} else {

View file

@ -0,0 +1,4 @@
func test():
var dict = {}
dict.test = 1
print(dict.test)

View file

@ -0,0 +1,2 @@
GDTEST_OK
1