diff options
author | Julien Nguyen <julien.nguyen3@gmail.com> | 2021-06-20 17:56:21 +0200 |
---|---|---|
committer | Julien Nguyen <julien.nguyen3@gmail.com> | 2021-08-21 21:56:11 +0200 |
commit | 9bc5119d4e6e2f7ef96b6c7a24a59b15f82db3f9 (patch) | |
tree | dc59b538bc4f86296f9ba70a4ae52219eb38e716 | |
parent | 0a001afec53aa4caed7820b34db4d7d15686e24d (diff) |
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 ddf4f281b4..8aa4e0d80f 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -951,7 +951,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 { |