diff --git a/tests/baselines/reference/constDeclarationShadowedByVarDeclaration.errors.txt b/tests/baselines/reference/constDeclarationShadowedByVarDeclaration.errors.txt index 99c02d87f45..ff669e41396 100644 --- a/tests/baselines/reference/constDeclarationShadowedByVarDeclaration.errors.txt +++ b/tests/baselines/reference/constDeclarationShadowedByVarDeclaration.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/constDeclarationShadowedByVarDeclaration.ts(7,9): error TS4090: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. -tests/cases/compiler/constDeclarationShadowedByVarDeclaration.ts(15,13): error TS4090: Cannot initialize outer scoped variable 'y' in the same scope as block scoped declaration 'y'. -tests/cases/compiler/constDeclarationShadowedByVarDeclaration.ts(22,7): error TS4090: Cannot initialize outer scoped variable 'z' in the same scope as block scoped declaration 'z'. +tests/cases/compiler/constDeclarationShadowedByVarDeclaration.ts(7,9): error TS2477: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. +tests/cases/compiler/constDeclarationShadowedByVarDeclaration.ts(15,13): error TS2477: Cannot initialize outer scoped variable 'y' in the same scope as block scoped declaration 'y'. +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/constDeclarationShadowedByVarDeclaration.ts (3 errors) ==== @@ -12,7 +12,7 @@ tests/cases/compiler/constDeclarationShadowedByVarDeclaration.ts(22,7): error TS var x = 0; ~ -!!! error TS4090: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. +!!! error TS2477: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. } @@ -22,7 +22,7 @@ tests/cases/compiler/constDeclarationShadowedByVarDeclaration.ts(22,7): error TS { var y = 0; ~ -!!! error TS4090: Cannot initialize outer scoped variable 'y' in the same scope as block scoped declaration 'y'. +!!! error TS2477: Cannot initialize outer scoped variable 'y' in the same scope as block scoped declaration 'y'. } } @@ -31,5 +31,5 @@ tests/cases/compiler/constDeclarationShadowedByVarDeclaration.ts(22,7): error TS const z = 0; var z = 0 ~ -!!! error TS4090: Cannot initialize outer scoped variable 'z' in the same scope as block scoped declaration 'z'. +!!! error TS2477: Cannot initialize outer scoped variable 'z' in the same scope as block scoped declaration 'z'. } \ No newline at end of file diff --git a/tests/baselines/reference/constEnumBadPropertyNames.errors.txt b/tests/baselines/reference/constEnumBadPropertyNames.errors.txt index 7cccf86b1c8..52c78fa68ae 100644 --- a/tests/baselines/reference/constEnumBadPropertyNames.errors.txt +++ b/tests/baselines/reference/constEnumBadPropertyNames.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/constEnumBadPropertyNames.ts(2,11): error TS4088: Property 'B' does not exist on 'const' enum 'E'. +tests/cases/compiler/constEnumBadPropertyNames.ts(2,11): error TS2475: Property 'B' does not exist on 'const' enum 'E'. ==== tests/cases/compiler/constEnumBadPropertyNames.ts (1 errors) ==== const enum E { A } var x = E["B"] ~~~ -!!! error TS4088: Property 'B' does not exist on 'const' enum 'E'. \ No newline at end of file +!!! error TS2475: Property 'B' does not exist on 'const' enum 'E'. \ No newline at end of file diff --git a/tests/baselines/reference/constEnumErrors.errors.txt b/tests/baselines/reference/constEnumErrors.errors.txt index 53fed12f382..edd3044f0bc 100644 --- a/tests/baselines/reference/constEnumErrors.errors.txt +++ b/tests/baselines/reference/constEnumErrors.errors.txt @@ -1,16 +1,16 @@ tests/cases/compiler/constEnumErrors.ts(1,12): error TS2300: Duplicate identifier 'E'. tests/cases/compiler/constEnumErrors.ts(5,8): error TS2300: Duplicate identifier 'E'. -tests/cases/compiler/constEnumErrors.ts(12,9): error TS4083: In 'const' enum declarations member initializer must be constant expression. -tests/cases/compiler/constEnumErrors.ts(14,9): error TS4083: In 'const' enum declarations member initializer must be constant expression. -tests/cases/compiler/constEnumErrors.ts(15,10): error TS4083: In 'const' enum declarations member initializer must be constant expression. -tests/cases/compiler/constEnumErrors.ts(22,13): error TS4085: A const enum member can only be accessed using a string literal. -tests/cases/compiler/constEnumErrors.ts(24,13): error TS4085: A const enum member can only be accessed using a string literal. -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. -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. -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. -tests/cases/compiler/constEnumErrors.ts(40,9): error TS4086: 'const' enum member initializer was evaluated to a non-finite value. -tests/cases/compiler/constEnumErrors.ts(41,9): error TS4086: 'const' enum member initializer was evaluated to a non-finite value. -tests/cases/compiler/constEnumErrors.ts(42,9): error TS4087: 'const' enum member initializer was evaluated to disallowed value 'NaN'. +tests/cases/compiler/constEnumErrors.ts(12,9): error TS2470: In 'const' enum declarations member initializer must be constant expression. +tests/cases/compiler/constEnumErrors.ts(14,9): error TS2470: In 'const' enum declarations member initializer must be constant expression. +tests/cases/compiler/constEnumErrors.ts(15,10): error TS2470: In 'const' enum declarations member initializer must be constant expression. +tests/cases/compiler/constEnumErrors.ts(22,13): error TS2472: A const enum member can only be accessed using a string literal. +tests/cases/compiler/constEnumErrors.ts(24,13): error TS2472: A const enum member can only be accessed using a string literal. +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. +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. +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. +tests/cases/compiler/constEnumErrors.ts(40,9): error TS2473: 'const' enum member initializer was evaluated to a non-finite value. +tests/cases/compiler/constEnumErrors.ts(41,9): error TS2473: 'const' enum member initializer was evaluated to a non-finite value. +tests/cases/compiler/constEnumErrors.ts(42,9): error TS2474: 'const' enum member initializer was evaluated to disallowed value 'NaN'. ==== tests/cases/compiler/constEnumErrors.ts (13 errors) ==== @@ -31,14 +31,14 @@ tests/cases/compiler/constEnumErrors.ts(42,9): error TS4087: 'const' enum member // forward reference to the element of the same enum X = Y, ~ -!!! error TS4083: In 'const' enum declarations member initializer must be constant expression. +!!! error TS2470: In 'const' enum declarations member initializer must be constant expression. // forward reference to the element of the same enum Y = E1.Z, ~~~~ -!!! error TS4083: In 'const' enum declarations member initializer must be constant expression. +!!! error TS2470: In 'const' enum declarations member initializer must be constant expression. Y1 = E1["Z"] ~~~~~~~ -!!! error TS4083: In 'const' enum declarations member initializer must be constant expression. +!!! error TS2470: In 'const' enum declarations member initializer must be constant expression. } const enum E2 { @@ -47,25 +47,25 @@ tests/cases/compiler/constEnumErrors.ts(42,9): error TS4087: 'const' enum member var y0 = E2[1] ~ -!!! error TS4085: A const enum member can only be accessed using a string literal. +!!! error TS2472: A const enum member can only be accessed using a string literal. var name = "A"; var y1 = E2[name]; ~~~~ -!!! error TS4085: A const enum member can only be accessed using a string literal. +!!! error TS2472: A const enum member can only be accessed using a string literal. var x = E2; ~~ -!!! 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. +!!! 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. var y = [E2]; ~~ -!!! 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. +!!! 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. function foo(t: any): void { } foo(E2); ~~ -!!! 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. +!!! 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. const enum NaNOrInfinity { A = 9007199254740992, @@ -75,11 +75,11 @@ tests/cases/compiler/constEnumErrors.ts(42,9): error TS4087: 'const' enum member E = D * D, F = E * E, // overflow ~~~~~ -!!! error TS4086: 'const' enum member initializer was evaluated to a non-finite value. +!!! error TS2473: 'const' enum member initializer was evaluated to a non-finite value. G = 1 / 0, // overflow ~~~~~ -!!! error TS4086: 'const' enum member initializer was evaluated to a non-finite value. +!!! error TS2473: 'const' enum member initializer was evaluated to a non-finite value. H = 0 / 0 // NaN ~~~~~ -!!! error TS4087: 'const' enum member initializer was evaluated to disallowed value 'NaN'. +!!! error TS2474: 'const' enum member initializer was evaluated to disallowed value 'NaN'. } \ No newline at end of file diff --git a/tests/baselines/reference/letInLetOrConstDeclarations.errors.txt b/tests/baselines/reference/letInLetOrConstDeclarations.errors.txt index 93dc307fc85..799d2d6b698 100644 --- a/tests/baselines/reference/letInLetOrConstDeclarations.errors.txt +++ b/tests/baselines/reference/letInLetOrConstDeclarations.errors.txt @@ -1,21 +1,21 @@ -tests/cases/compiler/letInLetOrConstDeclarations.ts(2,9): error TS4089: 'let' is not allowed to be used as a name in 'let' or 'const' declarations. -tests/cases/compiler/letInLetOrConstDeclarations.ts(3,14): error TS4089: 'let' is not allowed to be used as a name in 'let' or 'const' declarations. -tests/cases/compiler/letInLetOrConstDeclarations.ts(6,11): error TS4089: 'let' is not allowed to be used as a name in 'let' or 'const' declarations. +tests/cases/compiler/letInLetOrConstDeclarations.ts(2,9): error TS2476: 'let' is not allowed to be used as a name in 'let' or 'const' declarations. +tests/cases/compiler/letInLetOrConstDeclarations.ts(3,14): error TS2476: 'let' is not allowed to be used as a name in 'let' or 'const' declarations. +tests/cases/compiler/letInLetOrConstDeclarations.ts(6,11): error TS2476: 'let' is not allowed to be used as a name in 'let' or 'const' declarations. ==== tests/cases/compiler/letInLetOrConstDeclarations.ts (3 errors) ==== { let let = 1; // should error ~~~ -!!! error TS4089: 'let' is not allowed to be used as a name in 'let' or 'const' declarations. +!!! error TS2476: 'let' is not allowed to be used as a name in 'let' or 'const' declarations. for (let let in []) { } // should error ~~~ -!!! error TS4089: 'let' is not allowed to be used as a name in 'let' or 'const' declarations. +!!! error TS2476: 'let' is not allowed to be used as a name in 'let' or 'const' declarations. } { const let = 1; // should error ~~~ -!!! error TS4089: 'let' is not allowed to be used as a name in 'let' or 'const' declarations. +!!! error TS2476: 'let' is not allowed to be used as a name in 'let' or 'const' declarations. } { function let() { // should be ok diff --git a/tests/baselines/reference/shadowingViaLocalValue.errors.txt b/tests/baselines/reference/shadowingViaLocalValue.errors.txt index 2a585ba8b7d..5e683d3ee6f 100644 --- a/tests/baselines/reference/shadowingViaLocalValue.errors.txt +++ b/tests/baselines/reference/shadowingViaLocalValue.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/shadowingViaLocalValue.ts(2,5): error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher. -tests/cases/compiler/shadowingViaLocalValue.ts(4,13): error TS4090: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. +tests/cases/compiler/shadowingViaLocalValue.ts(4,13): error TS2477: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. tests/cases/compiler/shadowingViaLocalValue.ts(9,5): error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher. -tests/cases/compiler/shadowingViaLocalValue.ts(11,18): error TS4090: Cannot initialize outer scoped variable 'x1' in the same scope as block scoped declaration 'x1'. +tests/cases/compiler/shadowingViaLocalValue.ts(11,18): error TS2477: Cannot initialize outer scoped variable 'x1' in the same scope as block scoped declaration 'x1'. ==== tests/cases/compiler/shadowingViaLocalValue.ts (4 errors) ==== @@ -12,7 +12,7 @@ tests/cases/compiler/shadowingViaLocalValue.ts(11,18): error TS4090: Cannot init { var x = 1; ~ -!!! error TS4090: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. +!!! error TS2477: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. } } @@ -23,7 +23,7 @@ tests/cases/compiler/shadowingViaLocalValue.ts(11,18): error TS4090: Cannot init { for (var x1 = 0; ;); ~~ -!!! error TS4090: Cannot initialize outer scoped variable 'x1' in the same scope as block scoped declaration 'x1'. +!!! error TS2477: Cannot initialize outer scoped variable 'x1' in the same scope as block scoped declaration 'x1'. } }