You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
GDScript: Fix missing unsafety mark for binary op with weak variables
This commit is contained in:
@@ -2598,6 +2598,8 @@ 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);
|
result = get_operation_type(p_binary_op->variant_op, left_type, right_type, valid, p_binary_op);
|
||||||
if (!valid) {
|
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);
|
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) {
|
||||||
|
mark_node_unsafe(p_binary_op);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ERR_PRINT("Parser bug: unknown binary operation.");
|
ERR_PRINT("Parser bug: unknown binary operation.");
|
||||||
|
|||||||
Reference in New Issue
Block a user