You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/baselines/reference/constDeclarationShadowedByVarDeclaration.errors.txt
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff 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'.
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'.
@@ -31,14 +31,14 @@ tests/cases/compiler/constEnumErrors.ts(42,9): error TS4087: 'const' enum member
31
31
// forward reference to the element of the same enum
32
32
X = Y,
33
33
~
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.
35
35
// forward reference to the element of the same enum
36
36
Y = E1.Z,
37
37
~~~~
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.
39
39
Y1 = E1["Z"]
40
40
~~~~~~~
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.
42
42
}
43
43
44
44
const enum E2 {
@@ -47,25 +47,25 @@ tests/cases/compiler/constEnumErrors.ts(42,9): error TS4087: 'const' enum member
47
47
48
48
var y0 = E2[1]
49
49
~
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.
51
51
var name = "A";
52
52
var y1 = E2[name];
53
53
~~~~
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.
55
55
56
56
var x = E2;
57
57
~~
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.
59
59
var y = [E2];
60
60
~~
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.
62
62
63
63
function foo(t: any): void {
64
64
}
65
65
66
66
foo(E2);
67
67
~~
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.
69
69
70
70
const enum NaNOrInfinity {
71
71
A = 9007199254740992,
@@ -75,11 +75,11 @@ tests/cases/compiler/constEnumErrors.ts(42,9): error TS4087: 'const' enum member
75
75
E = D * D,
76
76
F = E * E, // overflow
77
77
~~~~~
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.
79
79
G = 1 / 0, // overflow
80
80
~~~~~
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.
82
82
H = 0 / 0 // NaN
83
83
~~~~~
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'.
Copy file name to clipboardExpand all lines: tests/baselines/reference/shadowingViaLocalValue.errors.txt
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
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'.
3
3
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'.
0 commit comments