diff options
author | Dmitrii Maganov <vonagam@gmail.com> | 2023-02-26 01:35:53 +0200 |
---|---|---|
committer | Dmitrii Maganov <vonagam@gmail.com> | 2023-02-26 01:35:53 +0200 |
commit | 638aa4f811ddc61053d8d3bb451662f9ad635a38 (patch) | |
tree | 29a0b0cf12137ace5d266da0eb2be4eae2473962 /modules | |
parent | 84a80721c5308df36c7295949c76a622c5e0edb9 (diff) |
GDScript: Fix wrong unsafety mark for binary operator
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gdscript/gdscript_analyzer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index e058187860..38d5ae6b77 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -2618,7 +2618,7 @@ void GDScriptAnalyzer::reduce_binary_op(GDScriptParser::BinaryOpNode *p_binary_o result = get_operation_type(p_binary_op->variant_op, left_type, right_type, valid, p_binary_op); if (!valid) { push_error(vformat(R"(Invalid operands "%s" and "%s" for "%s" operator.)", left_type.to_string(), right_type.to_string(), Variant::get_operator_name(p_binary_op->variant_op)), p_binary_op); - } else if (result.type_source != GDScriptParser::DataType::ANNOTATED_EXPLICIT) { + } else if (!result.is_hard_type()) { mark_node_unsafe(p_binary_op); } } else { |