Skip to content

Commit 03f8403

Browse files
committed
Accept new baselines
1 parent f9e2085 commit 03f8403

22 files changed

+180
-143
lines changed

tests/baselines/reference/constDeclarations-access3.errors.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ tests/cases/compiler/constDeclarations-access3.ts(22,3): error TS2540: Cannot as
1515
tests/cases/compiler/constDeclarations-access3.ts(23,5): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
1616
tests/cases/compiler/constDeclarations-access3.ts(24,5): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
1717
tests/cases/compiler/constDeclarations-access3.ts(26,7): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
18-
tests/cases/compiler/constDeclarations-access3.ts(28,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
18+
tests/cases/compiler/constDeclarations-access3.ts(28,3): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
1919

2020

2121
==== tests/cases/compiler/constDeclarations-access3.ts (18 errors) ====
@@ -81,8 +81,8 @@ tests/cases/compiler/constDeclarations-access3.ts(28,1): error TS2450: Left-hand
8181
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
8282

8383
M["x"] = 0;
84-
~~~~~~
85-
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
84+
~~~
85+
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
8686

8787
// OK
8888
var a = M.x + 1;

tests/baselines/reference/constDeclarations-access4.errors.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ tests/cases/compiler/constDeclarations-access4.ts(22,3): error TS2540: Cannot as
1515
tests/cases/compiler/constDeclarations-access4.ts(23,5): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
1616
tests/cases/compiler/constDeclarations-access4.ts(24,5): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
1717
tests/cases/compiler/constDeclarations-access4.ts(26,7): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
18-
tests/cases/compiler/constDeclarations-access4.ts(28,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
18+
tests/cases/compiler/constDeclarations-access4.ts(28,3): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
1919

2020

2121
==== tests/cases/compiler/constDeclarations-access4.ts (18 errors) ====
@@ -81,8 +81,8 @@ tests/cases/compiler/constDeclarations-access4.ts(28,1): error TS2450: Left-hand
8181
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
8282

8383
M["x"] = 0;
84-
~~~~~~
85-
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
84+
~~~
85+
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
8686

8787
// OK
8888
var a = M.x + 1;

tests/baselines/reference/constDeclarations-access5.errors.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ tests/cases/compiler/constDeclarations_access_2.ts(18,3): error TS2540: Cannot a
1515
tests/cases/compiler/constDeclarations_access_2.ts(19,5): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
1616
tests/cases/compiler/constDeclarations_access_2.ts(20,5): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
1717
tests/cases/compiler/constDeclarations_access_2.ts(22,7): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
18-
tests/cases/compiler/constDeclarations_access_2.ts(24,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
18+
tests/cases/compiler/constDeclarations_access_2.ts(24,3): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
1919

2020

2121
==== tests/cases/compiler/constDeclarations_access_2.ts (18 errors) ====
@@ -77,8 +77,8 @@ tests/cases/compiler/constDeclarations_access_2.ts(24,1): error TS2450: Left-han
7777
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
7878

7979
m["x"] = 0;
80-
~~~~~~
81-
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
80+
~~~
81+
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
8282

8383
// OK
8484
var a = m.x + 1;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
tests/cases/compiler/constEnumBadPropertyNames.ts(2,11): error TS2479: Property 'B' does not exist on 'const' enum 'E'.
1+
tests/cases/compiler/constEnumBadPropertyNames.ts(2,11): error TS2339: Property 'B' does not exist on type 'typeof E'.
22

33

44
==== tests/cases/compiler/constEnumBadPropertyNames.ts (1 errors) ====
55
const enum E { A }
66
var x = E["B"]
77
~~~
8-
!!! error TS2479: Property 'B' does not exist on 'const' enum 'E'.
8+
!!! error TS2339: Property 'B' does not exist on type 'typeof E'.

tests/baselines/reference/constIndexedAccess.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,16 @@ enum numbersNotConst {
7676
}
7777

7878
let s3 = test[numbersNotConst.zero];
79-
>s3 : any
80-
>test[numbersNotConst.zero] : any
79+
>s3 : string
80+
>test[numbersNotConst.zero] : string
8181
>test : indexAccess
8282
>numbersNotConst.zero : numbersNotConst.zero
8383
>numbersNotConst : typeof numbersNotConst
8484
>zero : numbersNotConst.zero
8585

8686
let n3 = test[numbersNotConst.one];
87-
>n3 : any
88-
>test[numbersNotConst.one] : any
87+
>n3 : number
88+
>test[numbersNotConst.one] : number
8989
>test : indexAccess
9090
>numbersNotConst.one : numbersNotConst.one
9191
>numbersNotConst : typeof numbersNotConst
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(6,25): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
1+
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(6,31): error TS2540: Cannot assign to 'A' because it is a constant or a read-only property.
22
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(7,29): error TS2540: Cannot assign to 'A' because it is a constant or a read-only property.
3-
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(10,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
4-
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(12,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
3+
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(10,9): error TS2540: Cannot assign to 'A' because it is a constant or a read-only property.
4+
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(12,1): error TS2542: Index signature in type 'typeof ENUM1' only permits reading.
55
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(12,7): error TS2304: Cannot find name 'A'.
66

77

@@ -12,19 +12,19 @@ tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOp
1212

1313
// expression
1414
var ResultIsNumber1 = --ENUM1["A"];
15-
~~~~~~~~~~
16-
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
15+
~~~
16+
!!! error TS2540: Cannot assign to 'A' because it is a constant or a read-only property.
1717
var ResultIsNumber2 = ENUM1.A--;
1818
~
1919
!!! error TS2540: Cannot assign to 'A' because it is a constant or a read-only property.
2020

2121
// miss assignment operator
2222
--ENUM1["A"];
23-
~~~~~~~~~~
24-
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
23+
~~~
24+
!!! error TS2540: Cannot assign to 'A' because it is a constant or a read-only property.
2525

2626
ENUM1[A]--;
2727
~~~~~~~~
28-
!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
28+
!!! error TS2542: Index signature in type 'typeof ENUM1' only permits reading.
2929
~
3030
!!! error TS2304: Cannot find name 'A'.

tests/baselines/reference/externalModuleImmutableBindings.errors.txt

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
tests/cases/compiler/f2.ts(7,7): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
2-
tests/cases/compiler/f2.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
2+
tests/cases/compiler/f2.ts(8,7): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
33
tests/cases/compiler/f2.ts(9,7): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
44
tests/cases/compiler/f2.ts(12,7): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
5-
tests/cases/compiler/f2.ts(13,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
5+
tests/cases/compiler/f2.ts(13,7): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
66
tests/cases/compiler/f2.ts(17,8): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
7-
tests/cases/compiler/f2.ts(18,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
7+
tests/cases/compiler/f2.ts(18,8): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
88
tests/cases/compiler/f2.ts(19,8): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
99
tests/cases/compiler/f2.ts(22,8): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
10-
tests/cases/compiler/f2.ts(23,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
10+
tests/cases/compiler/f2.ts(23,8): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
1111
tests/cases/compiler/f2.ts(27,12): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
1212
tests/cases/compiler/f2.ts(28,12): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
13-
tests/cases/compiler/f2.ts(29,6): error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'.
14-
tests/cases/compiler/f2.ts(30,6): error TS2485: The left-hand side of a 'for...of' statement cannot be a constant or a read-only property.
13+
tests/cases/compiler/f2.ts(29,12): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
14+
tests/cases/compiler/f2.ts(30,12): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
1515
tests/cases/compiler/f2.ts(31,12): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
1616
tests/cases/compiler/f2.ts(32,12): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
1717
tests/cases/compiler/f2.ts(36,13): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
1818
tests/cases/compiler/f2.ts(37,13): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
19-
tests/cases/compiler/f2.ts(38,6): error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'.
20-
tests/cases/compiler/f2.ts(39,6): error TS2485: The left-hand side of a 'for...of' statement cannot be a constant or a read-only property.
19+
tests/cases/compiler/f2.ts(38,13): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
20+
tests/cases/compiler/f2.ts(39,13): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
2121
tests/cases/compiler/f2.ts(40,13): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
2222
tests/cases/compiler/f2.ts(41,13): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
2323

@@ -36,8 +36,8 @@ tests/cases/compiler/f2.ts(41,13): error TS2339: Property 'blah' does not exist
3636
~
3737
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
3838
stuff['x'] = 1;
39-
~~~~~~~~~~
40-
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
39+
~~~
40+
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
4141
stuff.blah = 2;
4242
~~~~
4343
!!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
@@ -47,17 +47,17 @@ tests/cases/compiler/f2.ts(41,13): error TS2339: Property 'blah' does not exist
4747
~
4848
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
4949
stuff['x']++;
50-
~~~~~~~~~~
51-
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
50+
~~~
51+
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
5252
stuff['blah']++;
5353
stuff[n]++;
5454

5555
(stuff.x) = 0;
5656
~
5757
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
5858
(stuff['x']) = 1;
59-
~~~~~~~~~~~~
60-
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
59+
~~~
60+
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
6161
(stuff.blah) = 2;
6262
~~~~
6363
!!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
@@ -67,8 +67,8 @@ tests/cases/compiler/f2.ts(41,13): error TS2339: Property 'blah' does not exist
6767
~
6868
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
6969
(stuff['x'])++;
70-
~~~~~~~~~~~~
71-
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
70+
~~~
71+
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
7272
(stuff['blah'])++;
7373
(stuff[n])++;
7474

@@ -79,11 +79,11 @@ tests/cases/compiler/f2.ts(41,13): error TS2339: Property 'blah' does not exist
7979
~
8080
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
8181
for (stuff['x'] in []) {}
82-
~~~~~~~~~~
83-
!!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'.
82+
~~~
83+
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
8484
for (stuff['x'] of []) {}
85-
~~~~~~~~~~
86-
!!! error TS2485: The left-hand side of a 'for...of' statement cannot be a constant or a read-only property.
85+
~~~
86+
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
8787
for (stuff.blah in []) {}
8888
~~~~
8989
!!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
@@ -100,11 +100,11 @@ tests/cases/compiler/f2.ts(41,13): error TS2339: Property 'blah' does not exist
100100
~
101101
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
102102
for ((stuff['x']) in []) {}
103-
~~~~~~~~~~~~
104-
!!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'.
103+
~~~
104+
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
105105
for ((stuff['x']) of []) {}
106-
~~~~~~~~~~~~
107-
!!! error TS2485: The left-hand side of a 'for...of' statement cannot be a constant or a read-only property.
106+
~~~
107+
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
108108
for ((stuff.blah) in []) {}
109109
~~~~
110110
!!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.

tests/baselines/reference/for-inStatementsArrayErrors.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts(5,14): error TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'.
1+
tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts(5,16): error TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'.
22
tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts(6,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
33
tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts(7,9): error TS2365: Operator '===' cannot be applied to types 'string' and 'number'.
44
tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts(9,16): error TS2339: Property 'unknownProperty' does not exist on type 'string'.
@@ -12,7 +12,7 @@ tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.
1212

1313
for (let x in a) {
1414
let a1 = a[x + 1];
15-
~~~~~~~~
15+
~~~~~
1616
!!! error TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'.
1717
let a2 = a[x - 1];
1818
~

tests/baselines/reference/incrementOperatorWithEnumType.errors.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(6,25): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
1+
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(6,31): error TS2540: Cannot assign to 'B' because it is a constant or a read-only property.
22
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(7,29): error TS2540: Cannot assign to 'B' because it is a constant or a read-only property.
3-
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(10,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
3+
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(10,9): error TS2540: Cannot assign to 'B' because it is a constant or a read-only property.
44
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(12,7): error TS2540: Cannot assign to 'B' because it is a constant or a read-only property.
55

66

@@ -11,16 +11,16 @@ tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOp
1111

1212
// expression
1313
var ResultIsNumber1 = ++ENUM1["B"];
14-
~~~~~~~~~~
15-
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
14+
~~~
15+
!!! error TS2540: Cannot assign to 'B' because it is a constant or a read-only property.
1616
var ResultIsNumber2 = ENUM1.B++;
1717
~
1818
!!! error TS2540: Cannot assign to 'B' because it is a constant or a read-only property.
1919

2020
// miss assignment operator
2121
++ENUM1["B"];
22-
~~~~~~~~~~
23-
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
22+
~~~
23+
!!! error TS2540: Cannot assign to 'B' because it is a constant or a read-only property.
2424

2525
ENUM1.B++;
2626
~

0 commit comments

Comments
 (0)