Merge pull request #49765 from Blackiris/fix-assignment-with-operator-on-type-member

Fix assignment with operator on type member
This commit is contained in:
George Marques 2021-09-15 10:56:20 -03:00 committed by GitHub
commit 5a612d61b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -964,7 +964,7 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code
// Perform operator if any. // Perform operator if any.
if (assignment->operation != GDScriptParser::AssignmentNode::OP_NONE) { if (assignment->operation != GDScriptParser::AssignmentNode::OP_NONE) {
GDScriptCodeGenerator::Address value = codegen.add_temporary(); GDScriptCodeGenerator::Address value = codegen.add_temporary(_gdtype_from_datatype(subscript->get_datatype()));
if (subscript->is_attribute) { if (subscript->is_attribute) {
gen->write_get_named(value, name, prev_base); gen->write_get_named(value, name, prev_base);
} else { } else {