Skip to content
Playground(another site)

bynk.lex.integer_overflow

Error An integer literal is outside the Int range, the JS safe integers ±(2^53 − 1).

An Int is a JavaScript safe integer, from -(2^53 - 1) to 2^53 - 1 (±9007199254740991), the range the runtime holds exactly; a larger literal would round silently. The sign is a separate operator, so the size of the digits decides. For a larger value use a Float if rounding is acceptable, or a String for the exact digits.

Example

const Big: Int = 9007199254740993 // ✗ past 2^53 - 1
const Big: Int = 9007199254740991 // ✓ the largest `Int`

In the Book

See also

  • The grammar rule it governs: number_literal.
  • Every code in its category, Lexer, on the diagnostic index.
  • bynk explain bynk.lex.integer_overflow shows the same from the installed toolchain, without a network.