diff --git a/tests/baselines/reference/bigintWithoutLib.errors.txt b/tests/baselines/reference/bigintWithoutLib.errors.txt index 90a0fdcc31b..2647a06634f 100644 --- a/tests/baselines/reference/bigintWithoutLib.errors.txt +++ b/tests/baselines/reference/bigintWithoutLib.errors.txt @@ -2,18 +2,18 @@ tests/cases/compiler/bigintWithoutLib.ts(4,25): error TS2304: Cannot find name ' tests/cases/compiler/bigintWithoutLib.ts(5,13): error TS2304: Cannot find name 'BigInt'. tests/cases/compiler/bigintWithoutLib.ts(6,5): error TS2304: Cannot find name 'BigInt'. tests/cases/compiler/bigintWithoutLib.ts(7,13): error TS2304: Cannot find name 'BigInt'. -tests/cases/compiler/bigintWithoutLib.ts(7,30): error TS2736: BigInt literals are not available when targetting lower than ESNext. +tests/cases/compiler/bigintWithoutLib.ts(7,30): error TS2737: BigInt literals are not available when targetting lower than ESNext. tests/cases/compiler/bigintWithoutLib.ts(8,13): error TS2304: Cannot find name 'BigInt'. -tests/cases/compiler/bigintWithoutLib.ts(8,31): error TS2736: BigInt literals are not available when targetting lower than ESNext. +tests/cases/compiler/bigintWithoutLib.ts(8,31): error TS2737: BigInt literals are not available when targetting lower than ESNext. tests/cases/compiler/bigintWithoutLib.ts(9,1): error TS2322: Type 'Object' is not assignable to type 'bigint'. tests/cases/compiler/bigintWithoutLib.ts(11,13): error TS2554: Expected 0 arguments, but got 1. tests/cases/compiler/bigintWithoutLib.ts(15,18): error TS2304: Cannot find name 'BigInt64Array'. tests/cases/compiler/bigintWithoutLib.ts(15,38): error TS2552: Cannot find name 'BigInt64Array'. Did you mean 'bigIntArray'? tests/cases/compiler/bigintWithoutLib.ts(16,19): error TS2552: Cannot find name 'BigInt64Array'. Did you mean 'bigIntArray'? tests/cases/compiler/bigintWithoutLib.ts(17,19): error TS2552: Cannot find name 'BigInt64Array'. Did you mean 'bigIntArray'? -tests/cases/compiler/bigintWithoutLib.ts(17,34): error TS2736: BigInt literals are not available when targetting lower than ESNext. -tests/cases/compiler/bigintWithoutLib.ts(17,38): error TS2736: BigInt literals are not available when targetting lower than ESNext. -tests/cases/compiler/bigintWithoutLib.ts(17,42): error TS2736: BigInt literals are not available when targetting lower than ESNext. +tests/cases/compiler/bigintWithoutLib.ts(17,34): error TS2737: BigInt literals are not available when targetting lower than ESNext. +tests/cases/compiler/bigintWithoutLib.ts(17,38): error TS2737: BigInt literals are not available when targetting lower than ESNext. +tests/cases/compiler/bigintWithoutLib.ts(17,42): error TS2737: BigInt literals are not available when targetting lower than ESNext. tests/cases/compiler/bigintWithoutLib.ts(18,19): error TS2552: Cannot find name 'BigInt64Array'. Did you mean 'bigIntArray'? tests/cases/compiler/bigintWithoutLib.ts(19,19): error TS2304: Cannot find name 'BigInt64Array'. tests/cases/compiler/bigintWithoutLib.ts(20,19): error TS2304: Cannot find name 'BigInt64Array'. @@ -22,22 +22,22 @@ tests/cases/compiler/bigintWithoutLib.ts(27,19): error TS2304: Cannot find name tests/cases/compiler/bigintWithoutLib.ts(27,40): error TS2304: Cannot find name 'BigUint64Array'. tests/cases/compiler/bigintWithoutLib.ts(28,20): error TS2304: Cannot find name 'BigUint64Array'. tests/cases/compiler/bigintWithoutLib.ts(29,20): error TS2304: Cannot find name 'BigUint64Array'. -tests/cases/compiler/bigintWithoutLib.ts(29,36): error TS2736: BigInt literals are not available when targetting lower than ESNext. -tests/cases/compiler/bigintWithoutLib.ts(29,40): error TS2736: BigInt literals are not available when targetting lower than ESNext. -tests/cases/compiler/bigintWithoutLib.ts(29,44): error TS2736: BigInt literals are not available when targetting lower than ESNext. +tests/cases/compiler/bigintWithoutLib.ts(29,36): error TS2737: BigInt literals are not available when targetting lower than ESNext. +tests/cases/compiler/bigintWithoutLib.ts(29,40): error TS2737: BigInt literals are not available when targetting lower than ESNext. +tests/cases/compiler/bigintWithoutLib.ts(29,44): error TS2737: BigInt literals are not available when targetting lower than ESNext. tests/cases/compiler/bigintWithoutLib.ts(30,20): error TS2304: Cannot find name 'BigUint64Array'. tests/cases/compiler/bigintWithoutLib.ts(31,20): error TS2304: Cannot find name 'BigUint64Array'. tests/cases/compiler/bigintWithoutLib.ts(32,20): error TS2304: Cannot find name 'BigUint64Array'. tests/cases/compiler/bigintWithoutLib.ts(33,20): error TS2304: Cannot find name 'BigUint64Array'. tests/cases/compiler/bigintWithoutLib.ts(40,10): error TS2339: Property 'setBigInt64' does not exist on type 'DataView'. -tests/cases/compiler/bigintWithoutLib.ts(40,26): error TS2736: BigInt literals are not available when targetting lower than ESNext. +tests/cases/compiler/bigintWithoutLib.ts(40,26): error TS2737: BigInt literals are not available when targetting lower than ESNext. tests/cases/compiler/bigintWithoutLib.ts(41,10): error TS2339: Property 'setBigInt64' does not exist on type 'DataView'. -tests/cases/compiler/bigintWithoutLib.ts(41,26): error TS2736: BigInt literals are not available when targetting lower than ESNext. +tests/cases/compiler/bigintWithoutLib.ts(41,26): error TS2737: BigInt literals are not available when targetting lower than ESNext. tests/cases/compiler/bigintWithoutLib.ts(42,10): error TS2339: Property 'setBigInt64' does not exist on type 'DataView'. tests/cases/compiler/bigintWithoutLib.ts(43,10): error TS2339: Property 'setBigUint64' does not exist on type 'DataView'. -tests/cases/compiler/bigintWithoutLib.ts(43,26): error TS2736: BigInt literals are not available when targetting lower than ESNext. +tests/cases/compiler/bigintWithoutLib.ts(43,26): error TS2737: BigInt literals are not available when targetting lower than ESNext. tests/cases/compiler/bigintWithoutLib.ts(44,10): error TS2339: Property 'setBigUint64' does not exist on type 'DataView'. -tests/cases/compiler/bigintWithoutLib.ts(44,26): error TS2736: BigInt literals are not available when targetting lower than ESNext. +tests/cases/compiler/bigintWithoutLib.ts(44,26): error TS2737: BigInt literals are not available when targetting lower than ESNext. tests/cases/compiler/bigintWithoutLib.ts(45,10): error TS2339: Property 'setBigUint64' does not exist on type 'DataView'. tests/cases/compiler/bigintWithoutLib.ts(46,22): error TS2339: Property 'getBigInt64' does not exist on type 'DataView'. tests/cases/compiler/bigintWithoutLib.ts(47,22): error TS2339: Property 'getBigInt64' does not exist on type 'DataView'. @@ -62,12 +62,12 @@ tests/cases/compiler/bigintWithoutLib.ts(49,22): error TS2339: Property 'getBigU ~~~~~~ !!! error TS2304: Cannot find name 'BigInt'. ~~~~~~~ -!!! error TS2736: BigInt literals are not available when targetting lower than ESNext. +!!! error TS2737: BigInt literals are not available when targetting lower than ESNext. bigintVal = BigInt.asUintN(8, 0xFFFFn); ~~~~~~ !!! error TS2304: Cannot find name 'BigInt'. ~~~~~~~ -!!! error TS2736: BigInt literals are not available when targetting lower than ESNext. +!!! error TS2737: BigInt literals are not available when targetting lower than ESNext. bigintVal = bigintVal.valueOf(); // should error - bigintVal inferred as {} ~~~~~~~~~ !!! error TS2322: Type 'Object' is not assignable to type 'bigint'. @@ -93,11 +93,11 @@ tests/cases/compiler/bigintWithoutLib.ts(49,22): error TS2339: Property 'getBigU !!! error TS2552: Cannot find name 'BigInt64Array'. Did you mean 'bigIntArray'? !!! related TS2728 tests/cases/compiler/bigintWithoutLib.ts:15:5: 'bigIntArray' is declared here. ~~ -!!! error TS2736: BigInt literals are not available when targetting lower than ESNext. +!!! error TS2737: BigInt literals are not available when targetting lower than ESNext. ~~ -!!! error TS2736: BigInt literals are not available when targetting lower than ESNext. +!!! error TS2737: BigInt literals are not available when targetting lower than ESNext. ~~ -!!! error TS2736: BigInt literals are not available when targetting lower than ESNext. +!!! error TS2737: BigInt literals are not available when targetting lower than ESNext. bigIntArray = new BigInt64Array([1, 2, 3]); ~~~~~~~~~~~~~ !!! error TS2552: Cannot find name 'BigInt64Array'. Did you mean 'bigIntArray'? @@ -128,11 +128,11 @@ tests/cases/compiler/bigintWithoutLib.ts(49,22): error TS2339: Property 'getBigU ~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'BigUint64Array'. ~~ -!!! error TS2736: BigInt literals are not available when targetting lower than ESNext. +!!! error TS2737: BigInt literals are not available when targetting lower than ESNext. ~~ -!!! error TS2736: BigInt literals are not available when targetting lower than ESNext. +!!! error TS2737: BigInt literals are not available when targetting lower than ESNext. ~~ -!!! error TS2736: BigInt literals are not available when targetting lower than ESNext. +!!! error TS2737: BigInt literals are not available when targetting lower than ESNext. bigUintArray = new BigUint64Array([1, 2, 3]); ~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'BigUint64Array'. @@ -155,12 +155,12 @@ tests/cases/compiler/bigintWithoutLib.ts(49,22): error TS2339: Property 'getBigU ~~~~~~~~~~~ !!! error TS2339: Property 'setBigInt64' does not exist on type 'DataView'. ~~ -!!! error TS2736: BigInt literals are not available when targetting lower than ESNext. +!!! error TS2737: BigInt literals are not available when targetting lower than ESNext. dataView.setBigInt64(1, -1n, true); ~~~~~~~~~~~ !!! error TS2339: Property 'setBigInt64' does not exist on type 'DataView'. ~~ -!!! error TS2736: BigInt literals are not available when targetting lower than ESNext. +!!! error TS2737: BigInt literals are not available when targetting lower than ESNext. dataView.setBigInt64(1, -1); ~~~~~~~~~~~ !!! error TS2339: Property 'setBigInt64' does not exist on type 'DataView'. @@ -168,12 +168,12 @@ tests/cases/compiler/bigintWithoutLib.ts(49,22): error TS2339: Property 'getBigU ~~~~~~~~~~~~ !!! error TS2339: Property 'setBigUint64' does not exist on type 'DataView'. ~~~~ -!!! error TS2736: BigInt literals are not available when targetting lower than ESNext. +!!! error TS2737: BigInt literals are not available when targetting lower than ESNext. dataView.setBigUint64(2, 123n, true); ~~~~~~~~~~~~ !!! error TS2339: Property 'setBigUint64' does not exist on type 'DataView'. ~~~~ -!!! error TS2736: BigInt literals are not available when targetting lower than ESNext. +!!! error TS2737: BigInt literals are not available when targetting lower than ESNext. dataView.setBigUint64(2, 123); ~~~~~~~~~~~~ !!! error TS2339: Property 'setBigUint64' does not exist on type 'DataView'. diff --git a/tests/baselines/reference/numberVsBigIntOperations.errors.txt b/tests/baselines/reference/numberVsBigIntOperations.errors.txt index 58d19e6f7b9..fbd49ddd091 100644 --- a/tests/baselines/reference/numberVsBigIntOperations.errors.txt +++ b/tests/baselines/reference/numberVsBigIntOperations.errors.txt @@ -46,7 +46,7 @@ tests/cases/compiler/numberVsBigIntOperations.ts(25,34): error TS2365: Operator tests/cases/compiler/numberVsBigIntOperations.ts(25,43): error TS2365: Operator '>>' cannot be applied to types '1n' and '2'. tests/cases/compiler/numberVsBigIntOperations.ts(38,1): error TS2365: Operator '>>>=' cannot be applied to types 'bigint' and '1n'. tests/cases/compiler/numberVsBigIntOperations.ts(39,10): error TS2365: Operator '>>>' cannot be applied to types 'bigint' and '1n'. -tests/cases/compiler/numberVsBigIntOperations.ts(40,8): error TS2735: Operator '+' cannot be applied to type 'bigint'. +tests/cases/compiler/numberVsBigIntOperations.ts(40,8): error TS2736: Operator '+' cannot be applied to type 'bigint'. tests/cases/compiler/numberVsBigIntOperations.ts(50,10): error TS2367: This condition will always return 'false' since the types 'bigint' and 'number' have no overlap. tests/cases/compiler/numberVsBigIntOperations.ts(51,10): error TS2367: This condition will always return 'true' since the types 'bigint' and 'number' have no overlap. tests/cases/compiler/numberVsBigIntOperations.ts(52,10): error TS2367: This condition will always return 'false' since the types 'bigint' and 'number' have no overlap. @@ -59,7 +59,7 @@ tests/cases/compiler/numberVsBigIntOperations.ts(57,11): error TS2365: Operator tests/cases/compiler/numberVsBigIntOperations.ts(57,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. tests/cases/compiler/numberVsBigIntOperations.ts(60,1): error TS2365: Operator '+' cannot be applied to types 'number | bigint' and 'number | bigint'. tests/cases/compiler/numberVsBigIntOperations.ts(61,1): error TS2365: Operator '<<' cannot be applied to types 'number | bigint' and 'number | bigint'. -tests/cases/compiler/numberVsBigIntOperations.ts(70,2): error TS2735: Operator '+' cannot be applied to type 'number | bigint'. +tests/cases/compiler/numberVsBigIntOperations.ts(70,2): error TS2736: Operator '+' cannot be applied to type 'number | bigint'. tests/cases/compiler/numberVsBigIntOperations.ts(86,7): error TS1155: 'const' declarations must be initialized. tests/cases/compiler/numberVsBigIntOperations.ts(93,7): error TS1155: 'const' declarations must be initialized. @@ -202,7 +202,7 @@ tests/cases/compiler/numberVsBigIntOperations.ts(93,7): error TS1155: 'const' de !!! error TS2365: Operator '>>>' cannot be applied to types 'bigint' and '1n'. num = +bigInt; num = +num; num = +"3"; ~~~~~~ -!!! error TS2735: Operator '+' cannot be applied to type 'bigint'. +!!! error TS2736: Operator '+' cannot be applied to type 'bigint'. // Comparisons can be mixed let result: boolean; @@ -258,7 +258,7 @@ tests/cases/compiler/numberVsBigIntOperations.ts(93,7): error TS1155: 'const' de } +bigIntOrNumber; // should error, result in number ~~~~~~~~~~~~~~ -!!! error TS2735: Operator '+' cannot be applied to type 'number | bigint'. +!!! error TS2736: Operator '+' cannot be applied to type 'number | bigint'. ~bigIntOrNumber; // should infer number | bigint bigIntOrNumber++; // should infer number | bigint ++bigIntOrNumber; // should infer number | bigint diff --git a/tests/baselines/reference/parseBigInt.errors.txt b/tests/baselines/reference/parseBigInt.errors.txt index ea4ca01f5e1..9c273542c0b 100644 --- a/tests/baselines/reference/parseBigInt.errors.txt +++ b/tests/baselines/reference/parseBigInt.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/parseBigInt.ts(51,20): error TS2735: Operator '+' cannot be applied to type '123n'. -tests/cases/compiler/parseBigInt.ts(52,23): error TS2735: Operator '+' cannot be applied to type '291n'. +tests/cases/compiler/parseBigInt.ts(51,20): error TS2736: Operator '+' cannot be applied to type '123n'. +tests/cases/compiler/parseBigInt.ts(52,23): error TS2736: Operator '+' cannot be applied to type '291n'. tests/cases/compiler/parseBigInt.ts(56,25): error TS1005: ',' expected. tests/cases/compiler/parseBigInt.ts(57,25): error TS1005: ',' expected. tests/cases/compiler/parseBigInt.ts(58,22): error TS1005: ',' expected. @@ -70,10 +70,10 @@ tests/cases/compiler/parseBigInt.ts(70,72): error TS2345: Argument of type '3' i // Plus not allowed on literals const unaryPlus = +123n; ~~~~ -!!! error TS2735: Operator '+' cannot be applied to type '123n'. +!!! error TS2736: Operator '+' cannot be applied to type '123n'. const unaryPlusHex = +0x123n; ~~~~~~ -!!! error TS2735: Operator '+' cannot be applied to type '291n'. +!!! error TS2736: Operator '+' cannot be applied to type '291n'. // Parsing errors // In separate blocks because they each declare an "n" variable