summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-26 15:50:46 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-26 15:50:46 +0200
commita587c0a45aa3b8f8b8e3914869d1063192b10e26 (patch)
tree96c172150f5d85d5fe1ec6e1d70ca0cbbc4ee2ad
parentfa85821199065dacb6bbeaab3cdb0027a26751d8 (diff)
parent127e2333f4593e5c08c47508cf2bdc5232ef4260 (diff)
Merge pull request #66366 from asmaloney/script-fix-redundant-if
_parse_function()
-rw-r--r--modules/gdscript/gdscript_compiler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp
index 00e8223b9a..fd418ced47 100644
--- a/modules/gdscript/gdscript_compiler.cpp
+++ b/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);
// 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()) {
codegen.generator->write_construct_typed_array(dst_address, _gdtype_from_datatype(field_type.get_container_element_type(), codegen.script), Vector<GDScriptCodeGenerator::Address>());
} else {