Skip to content

Commit 87ea37f

Browse files
committed
Accept baselines
1 parent 3b967e3 commit 87ea37f

File tree

5 files changed

+40
-40
lines changed

5 files changed

+40
-40
lines changed

tests/baselines/reference/constDeclarationShadowedByVarDeclaration.errors.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
tests/cases/compiler/constDeclarationShadowedByVarDeclaration.ts(7,9): error TS4090: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'.
2-
tests/cases/compiler/constDeclarationShadowedByVarDeclaration.ts(15,13): error TS4090: Cannot initialize outer scoped variable 'y' in the same scope as block scoped declaration 'y'.
3-
tests/cases/compiler/constDeclarationShadowedByVarDeclaration.ts(22,7): error TS4090: Cannot initialize outer scoped variable 'z' in the same scope as block scoped declaration 'z'.
1+
tests/cases/compiler/constDeclarationShadowedByVarDeclaration.ts(7,9): error TS2477: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'.
2+
tests/cases/compiler/constDeclarationShadowedByVarDeclaration.ts(15,13): error TS2477: Cannot initialize outer scoped variable 'y' in the same scope as block scoped declaration 'y'.
3+
tests/cases/compiler/constDeclarationShadowedByVarDeclaration.ts(22,7): error TS2477: Cannot initialize outer scoped variable 'z' in the same scope as block scoped declaration 'z'.
44

55

66
==== tests/cases/compiler/constDeclarationShadowedByVarDeclaration.ts (3 errors) ====
@@ -12,7 +12,7 @@ tests/cases/compiler/constDeclarationShadowedByVarDeclaration.ts(22,7): error TS
1212

1313
var x = 0;
1414
~
15-
!!! error TS4090: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'.
15+
!!! error TS2477: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'.
1616
}
1717

1818

@@ -22,7 +22,7 @@ tests/cases/compiler/constDeclarationShadowedByVarDeclaration.ts(22,7): error TS
2222
{
2323
var y = 0;
2424
~
25-
!!! error TS4090: Cannot initialize outer scoped variable 'y' in the same scope as block scoped declaration 'y'.
25+
!!! error TS2477: Cannot initialize outer scoped variable 'y' in the same scope as block scoped declaration 'y'.
2626
}
2727
}
2828

@@ -31,5 +31,5 @@ tests/cases/compiler/constDeclarationShadowedByVarDeclaration.ts(22,7): error TS
3131
const z = 0;
3232
var z = 0
3333
~
34-
!!! error TS4090: Cannot initialize outer scoped variable 'z' in the same scope as block scoped declaration 'z'.
34+
!!! error TS2477: Cannot initialize outer scoped variable 'z' in the same scope as block scoped declaration 'z'.
3535
}
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 TS4088: Property 'B' does not exist on 'const' enum 'E'.
1+
tests/cases/compiler/constEnumBadPropertyNames.ts(2,11): error TS2475: Property 'B' does not exist on 'const' enum 'E'.
22

33

44
==== tests/cases/compiler/constEnumBadPropertyNames.ts (1 errors) ====
55
const enum E { A }
66
var x = E["B"]
77
~~~
8-
!!! error TS4088: Property 'B' does not exist on 'const' enum 'E'.
8+
!!! error TS2475: Property 'B' does not exist on 'const' enum 'E'.
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
tests/cases/compiler/constEnumErrors.ts(1,12): error TS2300: Duplicate identifier 'E'.
22
tests/cases/compiler/constEnumErrors.ts(5,8): error TS2300: Duplicate identifier 'E'.
3-
tests/cases/compiler/constEnumErrors.ts(12,9): error TS4083: In 'const' enum declarations member initializer must be constant expression.
4-
tests/cases/compiler/constEnumErrors.ts(14,9): error TS4083: In 'const' enum declarations member initializer must be constant expression.
5-
tests/cases/compiler/constEnumErrors.ts(15,10): error TS4083: In 'const' enum declarations member initializer must be constant expression.
6-
tests/cases/compiler/constEnumErrors.ts(22,13): error TS4085: A const enum member can only be accessed using a string literal.
7-
tests/cases/compiler/constEnumErrors.ts(24,13): error TS4085: A const enum member can only be accessed using a string literal.
8-
tests/cases/compiler/constEnumErrors.ts(26,9): error TS4084: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment.
9-
tests/cases/compiler/constEnumErrors.ts(27,10): error TS4084: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment.
10-
tests/cases/compiler/constEnumErrors.ts(32,5): error TS4084: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment.
11-
tests/cases/compiler/constEnumErrors.ts(40,9): error TS4086: 'const' enum member initializer was evaluated to a non-finite value.
12-
tests/cases/compiler/constEnumErrors.ts(41,9): error TS4086: 'const' enum member initializer was evaluated to a non-finite value.
13-
tests/cases/compiler/constEnumErrors.ts(42,9): error TS4087: 'const' enum member initializer was evaluated to disallowed value 'NaN'.
3+
tests/cases/compiler/constEnumErrors.ts(12,9): error TS2470: In 'const' enum declarations member initializer must be constant expression.
4+
tests/cases/compiler/constEnumErrors.ts(14,9): error TS2470: In 'const' enum declarations member initializer must be constant expression.
5+
tests/cases/compiler/constEnumErrors.ts(15,10): error TS2470: In 'const' enum declarations member initializer must be constant expression.
6+
tests/cases/compiler/constEnumErrors.ts(22,13): error TS2472: A const enum member can only be accessed using a string literal.
7+
tests/cases/compiler/constEnumErrors.ts(24,13): error TS2472: A const enum member can only be accessed using a string literal.
8+
tests/cases/compiler/constEnumErrors.ts(26,9): error TS2471: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment.
9+
tests/cases/compiler/constEnumErrors.ts(27,10): error TS2471: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment.
10+
tests/cases/compiler/constEnumErrors.ts(32,5): error TS2471: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment.
11+
tests/cases/compiler/constEnumErrors.ts(40,9): error TS2473: 'const' enum member initializer was evaluated to a non-finite value.
12+
tests/cases/compiler/constEnumErrors.ts(41,9): error TS2473: 'const' enum member initializer was evaluated to a non-finite value.
13+
tests/cases/compiler/constEnumErrors.ts(42,9): error TS2474: 'const' enum member initializer was evaluated to disallowed value 'NaN'.
1414

1515

1616
==== tests/cases/compiler/constEnumErrors.ts (13 errors) ====
@@ -31,14 +31,14 @@ tests/cases/compiler/constEnumErrors.ts(42,9): error TS4087: 'const' enum member
3131
// forward reference to the element of the same enum
3232
X = Y,
3333
~
34-
!!! error TS4083: In 'const' enum declarations member initializer must be constant expression.
34+
!!! error TS2470: In 'const' enum declarations member initializer must be constant expression.
3535
// forward reference to the element of the same enum
3636
Y = E1.Z,
3737
~~~~
38-
!!! error TS4083: In 'const' enum declarations member initializer must be constant expression.
38+
!!! error TS2470: In 'const' enum declarations member initializer must be constant expression.
3939
Y1 = E1["Z"]
4040
~~~~~~~
41-
!!! error TS4083: In 'const' enum declarations member initializer must be constant expression.
41+
!!! error TS2470: In 'const' enum declarations member initializer must be constant expression.
4242
}
4343

4444
const enum E2 {
@@ -47,25 +47,25 @@ tests/cases/compiler/constEnumErrors.ts(42,9): error TS4087: 'const' enum member
4747

4848
var y0 = E2[1]
4949
~
50-
!!! error TS4085: A const enum member can only be accessed using a string literal.
50+
!!! error TS2472: A const enum member can only be accessed using a string literal.
5151
var name = "A";
5252
var y1 = E2[name];
5353
~~~~
54-
!!! error TS4085: A const enum member can only be accessed using a string literal.
54+
!!! error TS2472: A const enum member can only be accessed using a string literal.
5555

5656
var x = E2;
5757
~~
58-
!!! error TS4084: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment.
58+
!!! error TS2471: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment.
5959
var y = [E2];
6060
~~
61-
!!! error TS4084: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment.
61+
!!! error TS2471: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment.
6262

6363
function foo(t: any): void {
6464
}
6565

6666
foo(E2);
6767
~~
68-
!!! error TS4084: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment.
68+
!!! error TS2471: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment.
6969

7070
const enum NaNOrInfinity {
7171
A = 9007199254740992,
@@ -75,11 +75,11 @@ tests/cases/compiler/constEnumErrors.ts(42,9): error TS4087: 'const' enum member
7575
E = D * D,
7676
F = E * E, // overflow
7777
~~~~~
78-
!!! error TS4086: 'const' enum member initializer was evaluated to a non-finite value.
78+
!!! error TS2473: 'const' enum member initializer was evaluated to a non-finite value.
7979
G = 1 / 0, // overflow
8080
~~~~~
81-
!!! error TS4086: 'const' enum member initializer was evaluated to a non-finite value.
81+
!!! error TS2473: 'const' enum member initializer was evaluated to a non-finite value.
8282
H = 0 / 0 // NaN
8383
~~~~~
84-
!!! error TS4087: 'const' enum member initializer was evaluated to disallowed value 'NaN'.
84+
!!! error TS2474: 'const' enum member initializer was evaluated to disallowed value 'NaN'.
8585
}

tests/baselines/reference/letInLetOrConstDeclarations.errors.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
tests/cases/compiler/letInLetOrConstDeclarations.ts(2,9): error TS4089: 'let' is not allowed to be used as a name in 'let' or 'const' declarations.
2-
tests/cases/compiler/letInLetOrConstDeclarations.ts(3,14): error TS4089: 'let' is not allowed to be used as a name in 'let' or 'const' declarations.
3-
tests/cases/compiler/letInLetOrConstDeclarations.ts(6,11): error TS4089: 'let' is not allowed to be used as a name in 'let' or 'const' declarations.
1+
tests/cases/compiler/letInLetOrConstDeclarations.ts(2,9): error TS2476: 'let' is not allowed to be used as a name in 'let' or 'const' declarations.
2+
tests/cases/compiler/letInLetOrConstDeclarations.ts(3,14): error TS2476: 'let' is not allowed to be used as a name in 'let' or 'const' declarations.
3+
tests/cases/compiler/letInLetOrConstDeclarations.ts(6,11): error TS2476: 'let' is not allowed to be used as a name in 'let' or 'const' declarations.
44

55

66
==== tests/cases/compiler/letInLetOrConstDeclarations.ts (3 errors) ====
77
{
88
let let = 1; // should error
99
~~~
10-
!!! error TS4089: 'let' is not allowed to be used as a name in 'let' or 'const' declarations.
10+
!!! error TS2476: 'let' is not allowed to be used as a name in 'let' or 'const' declarations.
1111
for (let let in []) { } // should error
1212
~~~
13-
!!! error TS4089: 'let' is not allowed to be used as a name in 'let' or 'const' declarations.
13+
!!! error TS2476: 'let' is not allowed to be used as a name in 'let' or 'const' declarations.
1414
}
1515
{
1616
const let = 1; // should error
1717
~~~
18-
!!! error TS4089: 'let' is not allowed to be used as a name in 'let' or 'const' declarations.
18+
!!! error TS2476: 'let' is not allowed to be used as a name in 'let' or 'const' declarations.
1919
}
2020
{
2121
function let() { // should be ok

tests/baselines/reference/shadowingViaLocalValue.errors.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
tests/cases/compiler/shadowingViaLocalValue.ts(2,5): error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher.
2-
tests/cases/compiler/shadowingViaLocalValue.ts(4,13): error TS4090: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'.
2+
tests/cases/compiler/shadowingViaLocalValue.ts(4,13): error TS2477: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'.
33
tests/cases/compiler/shadowingViaLocalValue.ts(9,5): error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher.
4-
tests/cases/compiler/shadowingViaLocalValue.ts(11,18): error TS4090: Cannot initialize outer scoped variable 'x1' in the same scope as block scoped declaration 'x1'.
4+
tests/cases/compiler/shadowingViaLocalValue.ts(11,18): error TS2477: Cannot initialize outer scoped variable 'x1' in the same scope as block scoped declaration 'x1'.
55

66

77
==== tests/cases/compiler/shadowingViaLocalValue.ts (4 errors) ====
@@ -12,7 +12,7 @@ tests/cases/compiler/shadowingViaLocalValue.ts(11,18): error TS4090: Cannot init
1212
{
1313
var x = 1;
1414
~
15-
!!! error TS4090: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'.
15+
!!! error TS2477: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'.
1616
}
1717
}
1818

@@ -23,7 +23,7 @@ tests/cases/compiler/shadowingViaLocalValue.ts(11,18): error TS4090: Cannot init
2323
{
2424
for (var x1 = 0; ;);
2525
~~
26-
!!! error TS4090: Cannot initialize outer scoped variable 'x1' in the same scope as block scoped declaration 'x1'.
26+
!!! error TS2477: Cannot initialize outer scoped variable 'x1' in the same scope as block scoped declaration 'x1'.
2727
}
2828
}
2929

0 commit comments

Comments
 (0)