summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-02-26 15:59:54 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-02-26 15:59:54 +0100
commit92d47f84fe3f1485ba43c9146405ca9fabcf4899 (patch)
treeb5748e0f94553fae2c9763ba0a7e7d5f15cc9223 /modules
parentc118790eb9b445f7f0501a90473c60062502d8d9 (diff)
parent638aa4f811ddc61053d8d3bb451662f9ad635a38 (diff)
Merge pull request #73957 from vonagam/fix-binary-op-safety
GDScript: Fix wrong unsafety mark for binary operator
Diffstat (limited to 'modules')
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp2
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 {