diff options
author | George Marques <george@gmarqu.es> | 2021-09-15 10:56:20 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-15 10:56:20 -0300 |
commit | 5a612d61b9a08e58d2b2b440c75b09ba3f5cbad5 (patch) | |
tree | 523bda9e90c934a0278fbba1b55e0c95335e90a7 | |
parent | c23823ac54059d4da74af737b3440b0eb58a6d4e (diff) | |
parent | 9bc5119d4e6e2f7ef96b6c7a24a59b15f82db3f9 (diff) |
Merge pull request #49765 from Blackiris/fix-assignment-with-operator-on-type-member
Fix assignment with operator on type member
-rw-r--r-- | modules/gdscript/gdscript_compiler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index 4f986cf29e..a8aef84db3 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -964,7 +964,7 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code // Perform operator if any. 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) { gen->write_get_named(value, name, prev_base); } else { |