Skip to content

Commit cd5928a

Browse files
Accepted baselines.
1 parent 9e92597 commit cd5928a

5 files changed

+101
-24
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
tests/cases/compiler/bigIntWithTargetES3.ts(5,22): error TS2737: BigInt literals are not available when targeting lower than ESNext.
2+
tests/cases/compiler/bigIntWithTargetES3.ts(5,29): error TS2737: BigInt literals are not available when targeting lower than ESNext.
3+
tests/cases/compiler/bigIntWithTargetES3.ts(5,39): error TS2737: BigInt literals are not available when targeting lower than ESNext.
4+
tests/cases/compiler/bigIntWithTargetES3.ts(5,48): error TS2737: BigInt literals are not available when targeting lower than ESNext.
5+
6+
7+
==== tests/cases/compiler/bigIntWithTargetES3.ts (4 errors) ====
8+
const normalNumber = 123; // should not error
9+
let bigintType: bigint; // should not error
10+
let bigintLiteralType: 123n; // should not error when used as type
11+
let bigintNegativeLiteralType: -123n; // should not error when used as type
12+
const bigintNumber = 123n * 0b1111n + 0o444n * 0x7fn; // each literal should error
13+
~~~~
14+
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.
15+
~~~~~~~
16+
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.
17+
~~~~~~
18+
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.
19+
~~~~~
20+
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.
21+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//// [bigIntWithTargetES3.ts]
2+
const normalNumber = 123; // should not error
3+
let bigintType: bigint; // should not error
4+
let bigintLiteralType: 123n; // should not error when used as type
5+
let bigintNegativeLiteralType: -123n; // should not error when used as type
6+
const bigintNumber = 123n * 0b1111n + 0o444n * 0x7fn; // each literal should error
7+
8+
9+
//// [bigIntWithTargetES3.js]
10+
var normalNumber = 123; // should not error
11+
var bigintType; // should not error
12+
var bigintLiteralType; // should not error when used as type
13+
var bigintNegativeLiteralType; // should not error when used as type
14+
var bigintNumber = 123n * 15n + 292n * 0x7fn; // each literal should error
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
=== tests/cases/compiler/bigIntWithTargetES3.ts ===
2+
const normalNumber = 123; // should not error
3+
>normalNumber : Symbol(normalNumber, Decl(bigIntWithTargetES3.ts, 0, 5))
4+
5+
let bigintType: bigint; // should not error
6+
>bigintType : Symbol(bigintType, Decl(bigIntWithTargetES3.ts, 1, 3))
7+
8+
let bigintLiteralType: 123n; // should not error when used as type
9+
>bigintLiteralType : Symbol(bigintLiteralType, Decl(bigIntWithTargetES3.ts, 2, 3))
10+
11+
let bigintNegativeLiteralType: -123n; // should not error when used as type
12+
>bigintNegativeLiteralType : Symbol(bigintNegativeLiteralType, Decl(bigIntWithTargetES3.ts, 3, 3))
13+
14+
const bigintNumber = 123n * 0b1111n + 0o444n * 0x7fn; // each literal should error
15+
>bigintNumber : Symbol(bigintNumber, Decl(bigIntWithTargetES3.ts, 4, 5))
16+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
=== tests/cases/compiler/bigIntWithTargetES3.ts ===
2+
const normalNumber = 123; // should not error
3+
>normalNumber : 123
4+
>123 : 123
5+
6+
let bigintType: bigint; // should not error
7+
>bigintType : bigint
8+
9+
let bigintLiteralType: 123n; // should not error when used as type
10+
>bigintLiteralType : 123n
11+
12+
let bigintNegativeLiteralType: -123n; // should not error when used as type
13+
>bigintNegativeLiteralType : -123n
14+
>-123n : -123n
15+
>123n : 123n
16+
17+
const bigintNumber = 123n * 0b1111n + 0o444n * 0x7fn; // each literal should error
18+
>bigintNumber : bigint
19+
>123n * 0b1111n + 0o444n * 0x7fn : bigint
20+
>123n * 0b1111n : bigint
21+
>123n : 123n
22+
>0b1111n : 15n
23+
>0o444n * 0x7fn : bigint
24+
>0o444n : 292n
25+
>0x7fn : 127n
26+

tests/baselines/reference/bigintWithoutLib.errors.txt

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ tests/cases/compiler/bigintWithoutLib.ts(4,25): error TS2304: Cannot find name '
22
tests/cases/compiler/bigintWithoutLib.ts(5,13): error TS2304: Cannot find name 'BigInt'.
33
tests/cases/compiler/bigintWithoutLib.ts(6,5): error TS2304: Cannot find name 'BigInt'.
44
tests/cases/compiler/bigintWithoutLib.ts(7,13): error TS2304: Cannot find name 'BigInt'.
5-
tests/cases/compiler/bigintWithoutLib.ts(7,30): error TS2737: BigInt literals are not available when targetting lower than ESNext.
5+
tests/cases/compiler/bigintWithoutLib.ts(7,30): error TS2737: BigInt literals are not available when targeting lower than ESNext.
66
tests/cases/compiler/bigintWithoutLib.ts(8,13): error TS2304: Cannot find name 'BigInt'.
7-
tests/cases/compiler/bigintWithoutLib.ts(8,31): error TS2737: BigInt literals are not available when targetting lower than ESNext.
7+
tests/cases/compiler/bigintWithoutLib.ts(8,31): error TS2737: BigInt literals are not available when targeting lower than ESNext.
88
tests/cases/compiler/bigintWithoutLib.ts(9,1): error TS2322: Type 'Object' is not assignable to type 'bigint'.
99
tests/cases/compiler/bigintWithoutLib.ts(11,13): error TS2554: Expected 0 arguments, but got 1.
1010
tests/cases/compiler/bigintWithoutLib.ts(15,18): error TS2304: Cannot find name 'BigInt64Array'.
1111
tests/cases/compiler/bigintWithoutLib.ts(15,38): error TS2552: Cannot find name 'BigInt64Array'. Did you mean 'bigIntArray'?
1212
tests/cases/compiler/bigintWithoutLib.ts(16,19): error TS2552: Cannot find name 'BigInt64Array'. Did you mean 'bigIntArray'?
1313
tests/cases/compiler/bigintWithoutLib.ts(17,19): error TS2552: Cannot find name 'BigInt64Array'. Did you mean 'bigIntArray'?
14-
tests/cases/compiler/bigintWithoutLib.ts(17,34): error TS2737: BigInt literals are not available when targetting lower than ESNext.
15-
tests/cases/compiler/bigintWithoutLib.ts(17,38): error TS2737: BigInt literals are not available when targetting lower than ESNext.
16-
tests/cases/compiler/bigintWithoutLib.ts(17,42): error TS2737: BigInt literals are not available when targetting lower than ESNext.
14+
tests/cases/compiler/bigintWithoutLib.ts(17,34): error TS2737: BigInt literals are not available when targeting lower than ESNext.
15+
tests/cases/compiler/bigintWithoutLib.ts(17,38): error TS2737: BigInt literals are not available when targeting lower than ESNext.
16+
tests/cases/compiler/bigintWithoutLib.ts(17,42): error TS2737: BigInt literals are not available when targeting lower than ESNext.
1717
tests/cases/compiler/bigintWithoutLib.ts(18,19): error TS2552: Cannot find name 'BigInt64Array'. Did you mean 'bigIntArray'?
1818
tests/cases/compiler/bigintWithoutLib.ts(19,19): error TS2304: Cannot find name 'BigInt64Array'.
1919
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
2222
tests/cases/compiler/bigintWithoutLib.ts(27,40): error TS2304: Cannot find name 'BigUint64Array'.
2323
tests/cases/compiler/bigintWithoutLib.ts(28,20): error TS2304: Cannot find name 'BigUint64Array'.
2424
tests/cases/compiler/bigintWithoutLib.ts(29,20): error TS2304: Cannot find name 'BigUint64Array'.
25-
tests/cases/compiler/bigintWithoutLib.ts(29,36): error TS2737: BigInt literals are not available when targetting lower than ESNext.
26-
tests/cases/compiler/bigintWithoutLib.ts(29,40): error TS2737: BigInt literals are not available when targetting lower than ESNext.
27-
tests/cases/compiler/bigintWithoutLib.ts(29,44): error TS2737: BigInt literals are not available when targetting lower than ESNext.
25+
tests/cases/compiler/bigintWithoutLib.ts(29,36): error TS2737: BigInt literals are not available when targeting lower than ESNext.
26+
tests/cases/compiler/bigintWithoutLib.ts(29,40): error TS2737: BigInt literals are not available when targeting lower than ESNext.
27+
tests/cases/compiler/bigintWithoutLib.ts(29,44): error TS2737: BigInt literals are not available when targeting lower than ESNext.
2828
tests/cases/compiler/bigintWithoutLib.ts(30,20): error TS2304: Cannot find name 'BigUint64Array'.
2929
tests/cases/compiler/bigintWithoutLib.ts(31,20): error TS2304: Cannot find name 'BigUint64Array'.
3030
tests/cases/compiler/bigintWithoutLib.ts(32,20): error TS2304: Cannot find name 'BigUint64Array'.
3131
tests/cases/compiler/bigintWithoutLib.ts(33,20): error TS2304: Cannot find name 'BigUint64Array'.
3232
tests/cases/compiler/bigintWithoutLib.ts(40,10): error TS2339: Property 'setBigInt64' does not exist on type 'DataView'.
33-
tests/cases/compiler/bigintWithoutLib.ts(40,26): error TS2737: BigInt literals are not available when targetting lower than ESNext.
33+
tests/cases/compiler/bigintWithoutLib.ts(40,26): error TS2737: BigInt literals are not available when targeting lower than ESNext.
3434
tests/cases/compiler/bigintWithoutLib.ts(41,10): error TS2339: Property 'setBigInt64' does not exist on type 'DataView'.
35-
tests/cases/compiler/bigintWithoutLib.ts(41,26): error TS2737: BigInt literals are not available when targetting lower than ESNext.
35+
tests/cases/compiler/bigintWithoutLib.ts(41,26): error TS2737: BigInt literals are not available when targeting lower than ESNext.
3636
tests/cases/compiler/bigintWithoutLib.ts(42,10): error TS2339: Property 'setBigInt64' does not exist on type 'DataView'.
3737
tests/cases/compiler/bigintWithoutLib.ts(43,10): error TS2339: Property 'setBigUint64' does not exist on type 'DataView'.
38-
tests/cases/compiler/bigintWithoutLib.ts(43,26): error TS2737: BigInt literals are not available when targetting lower than ESNext.
38+
tests/cases/compiler/bigintWithoutLib.ts(43,26): error TS2737: BigInt literals are not available when targeting lower than ESNext.
3939
tests/cases/compiler/bigintWithoutLib.ts(44,10): error TS2339: Property 'setBigUint64' does not exist on type 'DataView'.
40-
tests/cases/compiler/bigintWithoutLib.ts(44,26): error TS2737: BigInt literals are not available when targetting lower than ESNext.
40+
tests/cases/compiler/bigintWithoutLib.ts(44,26): error TS2737: BigInt literals are not available when targeting lower than ESNext.
4141
tests/cases/compiler/bigintWithoutLib.ts(45,10): error TS2339: Property 'setBigUint64' does not exist on type 'DataView'.
4242
tests/cases/compiler/bigintWithoutLib.ts(46,22): error TS2339: Property 'getBigInt64' does not exist on type 'DataView'.
4343
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
6262
~~~~~~
6363
!!! error TS2304: Cannot find name 'BigInt'.
6464
~~~~~~~
65-
!!! error TS2737: BigInt literals are not available when targetting lower than ESNext.
65+
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.
6666
bigintVal = BigInt.asUintN(8, 0xFFFFn);
6767
~~~~~~
6868
!!! error TS2304: Cannot find name 'BigInt'.
6969
~~~~~~~
70-
!!! error TS2737: BigInt literals are not available when targetting lower than ESNext.
70+
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.
7171
bigintVal = bigintVal.valueOf(); // should error - bigintVal inferred as {}
7272
~~~~~~~~~
7373
!!! 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
9393
!!! error TS2552: Cannot find name 'BigInt64Array'. Did you mean 'bigIntArray'?
9494
!!! related TS2728 tests/cases/compiler/bigintWithoutLib.ts:15:5: 'bigIntArray' is declared here.
9595
~~
96-
!!! error TS2737: BigInt literals are not available when targetting lower than ESNext.
96+
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.
9797
~~
98-
!!! error TS2737: BigInt literals are not available when targetting lower than ESNext.
98+
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.
9999
~~
100-
!!! error TS2737: BigInt literals are not available when targetting lower than ESNext.
100+
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.
101101
bigIntArray = new BigInt64Array([1, 2, 3]);
102102
~~~~~~~~~~~~~
103103
!!! 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
128128
~~~~~~~~~~~~~~
129129
!!! error TS2304: Cannot find name 'BigUint64Array'.
130130
~~
131-
!!! error TS2737: BigInt literals are not available when targetting lower than ESNext.
131+
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.
132132
~~
133-
!!! error TS2737: BigInt literals are not available when targetting lower than ESNext.
133+
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.
134134
~~
135-
!!! error TS2737: BigInt literals are not available when targetting lower than ESNext.
135+
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.
136136
bigUintArray = new BigUint64Array([1, 2, 3]);
137137
~~~~~~~~~~~~~~
138138
!!! error TS2304: Cannot find name 'BigUint64Array'.
@@ -155,25 +155,25 @@ tests/cases/compiler/bigintWithoutLib.ts(49,22): error TS2339: Property 'getBigU
155155
~~~~~~~~~~~
156156
!!! error TS2339: Property 'setBigInt64' does not exist on type 'DataView'.
157157
~~
158-
!!! error TS2737: BigInt literals are not available when targetting lower than ESNext.
158+
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.
159159
dataView.setBigInt64(1, -1n, true);
160160
~~~~~~~~~~~
161161
!!! error TS2339: Property 'setBigInt64' does not exist on type 'DataView'.
162162
~~
163-
!!! error TS2737: BigInt literals are not available when targetting lower than ESNext.
163+
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.
164164
dataView.setBigInt64(1, -1);
165165
~~~~~~~~~~~
166166
!!! error TS2339: Property 'setBigInt64' does not exist on type 'DataView'.
167167
dataView.setBigUint64(2, 123n);
168168
~~~~~~~~~~~~
169169
!!! error TS2339: Property 'setBigUint64' does not exist on type 'DataView'.
170170
~~~~
171-
!!! error TS2737: BigInt literals are not available when targetting lower than ESNext.
171+
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.
172172
dataView.setBigUint64(2, 123n, true);
173173
~~~~~~~~~~~~
174174
!!! error TS2339: Property 'setBigUint64' does not exist on type 'DataView'.
175175
~~~~
176-
!!! error TS2737: BigInt literals are not available when targetting lower than ESNext.
176+
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.
177177
dataView.setBigUint64(2, 123);
178178
~~~~~~~~~~~~
179179
!!! error TS2339: Property 'setBigUint64' does not exist on type 'DataView'.

0 commit comments

Comments
 (0)