--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalid.js --- # Input ```jsx // Invalid var x = 9007199254740993 var x = 9007199254740.993e3 var x = 9.007199254740993e15 var x = -9007199254740993 var x = 900719.9254740994 var x = -900719.9254740994 var x = 900719925474099_3 var x = 90_0719925_4740.9_93e3 var x = 9.0_0719925_474099_3e15 var x = -9_00719_9254_740993 var x = 900_719.92_54740_994 var x = -900_719.92_5474_0994 var x = 5123000000000000000000000000001 var x = -5123000000000000000000000000001 var x = 1.0000000000000000000000123 var x = 17498005798264095394980017816940970922825355447145699491406164851279623993595007385788105416184430592 var x = 2e999 var x = 0b100000000000000000000000000000000000000000000000000001 var x = 0B100000000000000000000000000000000000000000000000000001 var x = 0o400000000000000001 var x = 0O400000000000000001 var x = 0400000000000000001 var x = 0x20000000000001 var x = 0X20000000000001 var x = 5123_00000000000000000000000000_1 var x = -5_12300000000000000000000_0000001 var x = 1.0_00000000000000000_0000123 var x = 174_980057982_640953949800178169_409709228253554471456994_914061648512796239935950073857881054_1618443059_2 var x = 2e9_99 var x = 0b1_0000000000000000000000000000000000000000000000000000_1 var x = 0B10000000000_0000000000000000000000000000_000000000000001 var x = 0o4_00000000000000_001 var x = 0O4_0000000000000000_1 var x = 0x2_0000000000001 var x = 0X200000_0000000_1 ``` # Diagnostics ``` invalid.js:2:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 1 │ // Invalid > 2 │ var x = 9007199254740993 │ ^^^^^^^^^^^^^^^^ 3 │ var x = 9007199254740.993e3 4 │ var x = 9.007199254740993e15 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:3:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 1 │ // Invalid 2 │ var x = 9007199254740993 > 3 │ var x = 9007199254740.993e3 │ ^^^^^^^^^^^^^^^^^^^ 4 │ var x = 9.007199254740993e15 5 │ var x = -9007199254740993 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:4:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 2 │ var x = 9007199254740993 3 │ var x = 9007199254740.993e3 > 4 │ var x = 9.007199254740993e15 │ ^^^^^^^^^^^^^^^^^^^^ 5 │ var x = -9007199254740993 6 │ var x = 900719.9254740994 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:5:10 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 3 │ var x = 9007199254740.993e3 4 │ var x = 9.007199254740993e15 > 5 │ var x = -9007199254740993 │ ^^^^^^^^^^^^^^^^ 6 │ var x = 900719.9254740994 7 │ var x = -900719.9254740994 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:6:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 4 │ var x = 9.007199254740993e15 5 │ var x = -9007199254740993 > 6 │ var x = 900719.9254740994 │ ^^^^^^^^^^^^^^^^^ 7 │ var x = -900719.9254740994 8 │ var x = 900719925474099_3 i The value at runtime will be 900719.9254740993 ``` ``` invalid.js:7:10 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 5 │ var x = -9007199254740993 6 │ var x = 900719.9254740994 > 7 │ var x = -900719.9254740994 │ ^^^^^^^^^^^^^^^^^ 8 │ var x = 900719925474099_3 9 │ var x = 90_0719925_4740.9_93e3 i The value at runtime will be 900719.9254740993 ``` ``` invalid.js:8:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 6 │ var x = 900719.9254740994 7 │ var x = -900719.9254740994 > 8 │ var x = 900719925474099_3 │ ^^^^^^^^^^^^^^^^^ 9 │ var x = 90_0719925_4740.9_93e3 10 │ var x = 9.0_0719925_474099_3e15 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:9:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 7 │ var x = -900719.9254740994 8 │ var x = 900719925474099_3 > 9 │ var x = 90_0719925_4740.9_93e3 │ ^^^^^^^^^^^^^^^^^^^^^^ 10 │ var x = 9.0_0719925_474099_3e15 11 │ var x = -9_00719_9254_740993 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:10:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 8 │ var x = 900719925474099_3 9 │ var x = 90_0719925_4740.9_93e3 > 10 │ var x = 9.0_0719925_474099_3e15 │ ^^^^^^^^^^^^^^^^^^^^^^^ 11 │ var x = -9_00719_9254_740993 12 │ var x = 900_719.92_54740_994 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:11:10 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 9 │ var x = 90_0719925_4740.9_93e3 10 │ var x = 9.0_0719925_474099_3e15 > 11 │ var x = -9_00719_9254_740993 │ ^^^^^^^^^^^^^^^^^^^ 12 │ var x = 900_719.92_54740_994 13 │ var x = -900_719.92_5474_0994 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:12:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 10 │ var x = 9.0_0719925_474099_3e15 11 │ var x = -9_00719_9254_740993 > 12 │ var x = 900_719.92_54740_994 │ ^^^^^^^^^^^^^^^^^^^^ 13 │ var x = -900_719.92_5474_0994 14 │ var x = 5123000000000000000000000000001 i The value at runtime will be 900719.9254740993 ``` ``` invalid.js:13:10 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 11 │ var x = -9_00719_9254_740993 12 │ var x = 900_719.92_54740_994 > 13 │ var x = -900_719.92_5474_0994 │ ^^^^^^^^^^^^^^^^^^^^ 14 │ var x = 5123000000000000000000000000001 15 │ var x = -5123000000000000000000000000001 i The value at runtime will be 900719.9254740993 ``` ``` invalid.js:14:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 12 │ var x = 900_719.92_54740_994 13 │ var x = -900_719.92_5474_0994 > 14 │ var x = 5123000000000000000000000000001 │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 15 │ var x = -5123000000000000000000000000001 16 │ var x = 1.0000000000000000000000123 i The value at runtime will be 5123000000000000000000000000000 ``` ``` invalid.js:15:10 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 13 │ var x = -900_719.92_5474_0994 14 │ var x = 5123000000000000000000000000001 > 15 │ var x = -5123000000000000000000000000001 │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 16 │ var x = 1.0000000000000000000000123 17 │ var x = 17498005798264095394980017816940970922825355447145699491406164851279623993595007385788105416184430592 i The value at runtime will be 5123000000000000000000000000000 ``` ``` invalid.js:16:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 14 │ var x = 5123000000000000000000000000001 15 │ var x = -5123000000000000000000000000001 > 16 │ var x = 1.0000000000000000000000123 │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 17 │ var x = 17498005798264095394980017816940970922825355447145699491406164851279623993595007385788105416184430592 18 │ var x = 2e999 i The value at runtime will be 1 ``` ``` invalid.js:17:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 15 │ var x = -5123000000000000000000000000001 16 │ var x = 1.0000000000000000000000123 > 17 │ var x = 17498005798264095394980017816940970922825355447145699491406164851279623993595007385788105416184430592 │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 18 │ var x = 2e999 19 │ var x = 0b100000000000000000000000000000000000000000000000000001 i The value at runtime will be 17498005798264095000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ``` ``` invalid.js:18:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 16 │ var x = 1.0000000000000000000000123 17 │ var x = 17498005798264095394980017816940970922825355447145699491406164851279623993595007385788105416184430592 > 18 │ var x = 2e999 │ ^^^^^ 19 │ var x = 0b100000000000000000000000000000000000000000000000000001 20 │ var x = 0B100000000000000000000000000000000000000000000000000001 i The value at runtime will be inf ``` ``` invalid.js:19:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 17 │ var x = 17498005798264095394980017816940970922825355447145699491406164851279623993595007385788105416184430592 18 │ var x = 2e999 > 19 │ var x = 0b100000000000000000000000000000000000000000000000000001 │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 20 │ var x = 0B100000000000000000000000000000000000000000000000000001 21 │ var x = 0o400000000000000001 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:20:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 18 │ var x = 2e999 19 │ var x = 0b100000000000000000000000000000000000000000000000000001 > 20 │ var x = 0B100000000000000000000000000000000000000000000000000001 │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 21 │ var x = 0o400000000000000001 22 │ var x = 0O400000000000000001 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:21:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 19 │ var x = 0b100000000000000000000000000000000000000000000000000001 20 │ var x = 0B100000000000000000000000000000000000000000000000000001 > 21 │ var x = 0o400000000000000001 │ ^^^^^^^^^^^^^^^^^^^^ 22 │ var x = 0O400000000000000001 23 │ var x = 0400000000000000001 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:22:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 20 │ var x = 0B100000000000000000000000000000000000000000000000000001 21 │ var x = 0o400000000000000001 > 22 │ var x = 0O400000000000000001 │ ^^^^^^^^^^^^^^^^^^^^ 23 │ var x = 0400000000000000001 24 │ var x = 0x20000000000001 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:23:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 21 │ var x = 0o400000000000000001 22 │ var x = 0O400000000000000001 > 23 │ var x = 0400000000000000001 │ ^^^^^^^^^^^^^^^^^^^ 24 │ var x = 0x20000000000001 25 │ var x = 0X20000000000001 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:24:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 22 │ var x = 0O400000000000000001 23 │ var x = 0400000000000000001 > 24 │ var x = 0x20000000000001 │ ^^^^^^^^^^^^^^^^ 25 │ var x = 0X20000000000001 26 │ var x = 5123_00000000000000000000000000_1 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:25:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 23 │ var x = 0400000000000000001 24 │ var x = 0x20000000000001 > 25 │ var x = 0X20000000000001 │ ^^^^^^^^^^^^^^^^ 26 │ var x = 5123_00000000000000000000000000_1 27 │ var x = -5_12300000000000000000000_0000001 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:26:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 24 │ var x = 0x20000000000001 25 │ var x = 0X20000000000001 > 26 │ var x = 5123_00000000000000000000000000_1 │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 27 │ var x = -5_12300000000000000000000_0000001 28 │ var x = 1.0_00000000000000000_0000123 i The value at runtime will be 5123000000000000000000000000000 ``` ``` invalid.js:27:10 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 25 │ var x = 0X20000000000001 26 │ var x = 5123_00000000000000000000000000_1 > 27 │ var x = -5_12300000000000000000000_0000001 │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 28 │ var x = 1.0_00000000000000000_0000123 29 │ var x = 174_980057982_640953949800178169_409709228253554471456994_914061648512796239935950073857881054_1618443059_2 i The value at runtime will be 5123000000000000000000000000000 ``` ``` invalid.js:28:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 26 │ var x = 5123_00000000000000000000000000_1 27 │ var x = -5_12300000000000000000000_0000001 > 28 │ var x = 1.0_00000000000000000_0000123 │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 29 │ var x = 174_980057982_640953949800178169_409709228253554471456994_914061648512796239935950073857881054_1618443059_2 30 │ var x = 2e9_99 i The value at runtime will be 1 ``` ``` invalid.js:29:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 27 │ var x = -5_12300000000000000000000_0000001 28 │ var x = 1.0_00000000000000000_0000123 > 29 │ var x = 174_980057982_640953949800178169_409709228253554471456994_914061648512796239935950073857881054_1618443059_2 │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 30 │ var x = 2e9_99 31 │ var x = 0b1_0000000000000000000000000000000000000000000000000000_1 i The value at runtime will be 17498005798264095000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ``` ``` invalid.js:30:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 28 │ var x = 1.0_00000000000000000_0000123 29 │ var x = 174_980057982_640953949800178169_409709228253554471456994_914061648512796239935950073857881054_1618443059_2 > 30 │ var x = 2e9_99 │ ^^^^^^ 31 │ var x = 0b1_0000000000000000000000000000000000000000000000000000_1 32 │ var x = 0B10000000000_0000000000000000000000000000_000000000000001 i The value at runtime will be inf ``` ``` invalid.js:31:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 29 │ var x = 174_980057982_640953949800178169_409709228253554471456994_914061648512796239935950073857881054_1618443059_2 30 │ var x = 2e9_99 > 31 │ var x = 0b1_0000000000000000000000000000000000000000000000000000_1 │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 32 │ var x = 0B10000000000_0000000000000000000000000000_000000000000001 33 │ var x = 0o4_00000000000000_001 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:32:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 30 │ var x = 2e9_99 31 │ var x = 0b1_0000000000000000000000000000000000000000000000000000_1 > 32 │ var x = 0B10000000000_0000000000000000000000000000_000000000000001 │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 33 │ var x = 0o4_00000000000000_001 34 │ var x = 0O4_0000000000000000_1 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:33:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 31 │ var x = 0b1_0000000000000000000000000000000000000000000000000000_1 32 │ var x = 0B10000000000_0000000000000000000000000000_000000000000001 > 33 │ var x = 0o4_00000000000000_001 │ ^^^^^^^^^^^^^^^^^^^^^^ 34 │ var x = 0O4_0000000000000000_1 35 │ var x = 0x2_0000000000001 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:34:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 32 │ var x = 0B10000000000_0000000000000000000000000000_000000000000001 33 │ var x = 0o4_00000000000000_001 > 34 │ var x = 0O4_0000000000000000_1 │ ^^^^^^^^^^^^^^^^^^^^^^ 35 │ var x = 0x2_0000000000001 36 │ var x = 0X200000_0000000_1 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:35:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 33 │ var x = 0o4_00000000000000_001 34 │ var x = 0O4_0000000000000000_1 > 35 │ var x = 0x2_0000000000001 │ ^^^^^^^^^^^^^^^^^ 36 │ var x = 0X200000_0000000_1 i The value at runtime will be 9007199254740992 ``` ``` invalid.js:36:9 lint/correctness/noPrecisionLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This number literal will lose precision at runtime. 34 │ var x = 0O4_0000000000000000_1 35 │ var x = 0x2_0000000000001 > 36 │ var x = 0X200000_0000000_1 │ ^^^^^^^^^^^^^^^^^^ i The value at runtime will be 9007199254740992 ```