pub fn arith_type(
cr: &dyn Core,
terms: &[Slot],
) -> Result<Rc<dyn Type>, RiddleError>Expand description
Returns the resulting numeric type for arithmetic terms.
If all terms are int the result is int, otherwise mixed int/real terms yield real. Any other type combination results in a type error.