Skip to main content

arithmetic_operation

Function arithmetic_operation 

Source
pub fn arithmetic_operation(
    left: &BoundValueKind,
    left_type: &Arc<LemmaType>,
    op: &ArithmeticComputation,
    right: &BoundValueKind,
    right_type: &Arc<LemmaType>,
    signature_index: &SignatureIndex,
) -> OperationResult
Expand description

Perform type-aware arithmetic operation, returning OperationResult (Veto for runtime errors).

expression_units and signature_index come from the plan’s resolved types and are used during expression evaluation to resolve combined unit signatures back to a named unit and owning type.