Semantic Diff

#9314 Fix a compiler crash on an @inline int constant outside the int range

1 commit

54b923a841f9ce8a4a8fbfb48fa9269cb64cfab1..pr-9314

fb11b55b9 · cknitt + Claude · Nov 17, 2026, 19:48 UTC

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.