Browse Source

Merge pull request #66366 from asmaloney/script-fix-redundant-if

_parse_function()
Rémi Verschelde 3 years ago
parent
commit
a587c0a45a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/gdscript/gdscript_compiler.cpp

+ 1 - 1
modules/gdscript/gdscript_compiler.cpp

@@ -2041,7 +2041,7 @@ GDScriptFunction *GDScriptCompiler::_parse_function(Error &r_error, GDScript *p_
 				codegen.generator->write_newline(field->initializer->start_line);
 				codegen.generator->write_newline(field->initializer->start_line);
 
 
 				// For typed arrays we need to make sure this is already initialized correctly so typed assignment work.
 				// For typed arrays we need to make sure this is already initialized correctly so typed assignment work.
-				if (field_type.is_hard_type() && field_type.builtin_type == Variant::ARRAY && field_type.has_container_element_type()) {
+				if (field_type.is_hard_type() && field_type.builtin_type == Variant::ARRAY) {
 					if (field_type.has_container_element_type()) {
 					if (field_type.has_container_element_type()) {
 						codegen.generator->write_construct_typed_array(dst_address, _gdtype_from_datatype(field_type.get_container_element_type(), codegen.script), Vector<GDScriptCodeGenerator::Address>());
 						codegen.generator->write_construct_typed_array(dst_address, _gdtype_from_datatype(field_type.get_container_element_type(), codegen.script), Vector<GDScriptCodeGenerator::Address>());
 					} else {
 					} else {