pub fn check_logical_not_operation(
operand_type: &TypeId,
location: &Location,
) -> SemanticResult
Expand description
Checks if logical negation (!) is valid for the given operand type. Only boolean types can be logically negated.
§Arguments
operand_type
- The type of the operandlocation
- The source location of the operation
§Returns
Ok(bool_type)
if the operand is booleanErr
with a descriptive error message if the operand is not boolean