Function check_logical_not_operation

Source
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 operand
  • location - The source location of the operation

§Returns

  • Ok(bool_type) if the operand is boolean
  • Err with a descriptive error message if the operand is not boolean