Skip to main content

unify_numeric

Function unify_numeric 

Source
pub fn unify_numeric(
    a: &InferType,
    b: &InferType,
) -> Result<InferType, TypeError>
Expand description

Numeric promotion: Float wins; Int + Int = Int; Nat + Nat = Nat; Byte + Byte = Byte; Byte + Int (literal context) = Byte; otherwise error.