E1138: constant arithmetic overflows its type
Integer arithmetic traps when the result does not fit the type of the operands (ADR-0115).
Integer arithmetic traps when the result does not fit the type of the operands
(ADR-0115). When both operands are literals, the compiler computes the result
itself and reports the overflow at compile time, instead of building a program
that is sure to trap. This holds for +, - and *, and for / when the
minimum value is divided by -1. The message names the operator and the type,
and suggests +% to wrap or +| to saturate.
Example
actus
actus
Fix
Use a wider type, a wrapping or saturating operator, or a value that fits.
actus
Run actus explain E1138 in your terminal to read this entry offline. Browse Modules & rules or all error codes.