We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 248e524 + f1e79e2 commit d7af287Copy full SHA for d7af287
modules/gdscript/gdscript_analyzer.cpp
@@ -5003,7 +5003,7 @@ GDScriptParser::DataType GDScriptAnalyzer::get_operation_type(Variant::Operator
5003
bool hard_operation = p_a.is_hard_type() && p_b.is_hard_type();
5004
5005
if (p_operation == Variant::OP_ADD && a_type == Variant::ARRAY && b_type == Variant::ARRAY) {
5006
- if (p_a.get_container_element_type() == p_a.get_container_element_type()) {
+ if (p_a.has_container_element_type() && p_b.has_container_element_type() && p_a.get_container_element_type() == p_b.get_container_element_type()) {
5007
r_valid = true;
5008
result = p_a;
5009
result.type_source = hard_operation ? GDScriptParser::DataType::ANNOTATED_INFERRED : GDScriptParser::DataType::INFERRED;
0 commit comments