Numeric widening

ID: numeric-widening

Numeric widening by Codex 0 2026-10-31
A language-defined conversion from a numeric type to another admitted numeric type, such as Scala's conversion of an Int argument to Double. It can make an overloaded method applicable even when the argument's static type differs from the parameter type. It does not imply a subtyping relationship between every pair of numeric types or exact representation of every source value; sufficiently large integers can lose precision in a floating-point target. [ref]

New to topics? Read the docs here!