Fix a compiler crash on an @inline int constant outside the int range
Why
The built-in PPX converted the literal with Int32.of_string and did not catch the failure, so the compiler crashed (#9299).
addedDiagnostic out-of-range @inline int
@inline let big = 10000000000let use = () => big
diagnostic
Before
After
Fatal error: exception Failure("Int32.of_string")This @inline integer constant is outside the int range (-2147483648 to 2147483647).
Fixes #9299
Review
- Does the same apply to @inline(...) in a signature? Yes, both places use the same check; a fixture covers each.