Function resolve_unsuffixed_binary_op_operands

Source
fn resolve_unsuffixed_binary_op_operands(
    lhs: &Value,
    rhs: &Value,
    op: &BinaryOperation,
    expected_ty: &Option<Type>,
    span: &Span,
) -> Result<(Value, Value)>
Expand description

Resolves unsuffixed numeric operands for binary operations by inferring types based on the other operand, the operation type, and an optional expected type. Handles special cases for multiplication and exponentiation with additional logic for Group, Scalar, and Field type inference. Ensures that both operands are resolved to compatible types before evaluation. Returns a tuple of resolved Values or an error if resolution fails.