pub fn check_logical_operation(
left_type: &TypeId,
right_type: &TypeId,
operator: &BinaryOperator,
location: &Location,
) -> SemanticResult
Expand description
Checks if types are compatible for logical operations (AND, OR). Both operands must be boolean types.
§Arguments
left_type
- The type of the left operandright_type
- The type of the right operandoperator
- The logical operator (either And or Or)location
- The source location of the operation
§Returns
Ok(bool_type())
if both operands are booleanErr
with a descriptive error message otherwise