diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 6210a20afa6..7e2b429dd9f 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1955,6 +1955,10 @@ "category": "Error", "code": 2691 }, + "Cannot find name '{0}'. A type exists with this name, but no value.": { + "category": "Error", + "code": 2692 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", "code": 4000 diff --git a/tests/baselines/reference/assignments.errors.txt b/tests/baselines/reference/assignments.errors.txt index 04a68499690..99457ed5837 100644 --- a/tests/baselines/reference/assignments.errors.txt +++ b/tests/baselines/reference/assignments.errors.txt @@ -3,7 +3,7 @@ tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(14,1): er tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(17,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(18,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(21,1): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(31,1): error TS2691: Cannot find name 'I'. A type exists with this name, but no value. +tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(31,1): error TS2692: Cannot find name 'I'. A type exists with this name, but no value. ==== tests/cases/conformance/expressions/valuesAndReferences/assignments.ts (6 errors) ==== @@ -49,4 +49,4 @@ tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(31,1): er interface I { } I = null; // Error ~ -!!! error TS2691: Cannot find name 'I'. A type exists with this name, but no value. \ No newline at end of file +!!! error TS2692: Cannot find name 'I'. A type exists with this name, but no value. \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsInterfaceInExpression.errors.txt b/tests/baselines/reference/classExtendsInterfaceInExpression.errors.txt index 084933bae6f..3bfaba31113 100644 --- a/tests/baselines/reference/classExtendsInterfaceInExpression.errors.txt +++ b/tests/baselines/reference/classExtendsInterfaceInExpression.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/classExtendsInterfaceInExpression.ts(7,25): error TS2691: Cannot find name 'A'. A type exists with this name, but no value. +tests/cases/compiler/classExtendsInterfaceInExpression.ts(7,25): error TS2692: Cannot find name 'A'. A type exists with this name, but no value. ==== tests/cases/compiler/classExtendsInterfaceInExpression.ts (1 errors) ==== @@ -10,5 +10,5 @@ tests/cases/compiler/classExtendsInterfaceInExpression.ts(7,25): error TS2691: C class C extends factory(A) {} ~ -!!! error TS2691: Cannot find name 'A'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'A'. A type exists with this name, but no value. \ No newline at end of file diff --git a/tests/baselines/reference/errorsOnImportedSymbol.errors.txt b/tests/baselines/reference/errorsOnImportedSymbol.errors.txt index f64eb864445..960e707cfee 100644 --- a/tests/baselines/reference/errorsOnImportedSymbol.errors.txt +++ b/tests/baselines/reference/errorsOnImportedSymbol.errors.txt @@ -1,15 +1,15 @@ -tests/cases/compiler/errorsOnImportedSymbol_1.ts(2,13): error TS2691: Cannot find name 'Sammy'. A type exists with this name, but no value. -tests/cases/compiler/errorsOnImportedSymbol_1.ts(3,9): error TS2691: Cannot find name 'Sammy'. A type exists with this name, but no value. +tests/cases/compiler/errorsOnImportedSymbol_1.ts(2,13): error TS2692: Cannot find name 'Sammy'. A type exists with this name, but no value. +tests/cases/compiler/errorsOnImportedSymbol_1.ts(3,9): error TS2692: Cannot find name 'Sammy'. A type exists with this name, but no value. ==== tests/cases/compiler/errorsOnImportedSymbol_1.ts (2 errors) ==== import Sammy = require("./errorsOnImportedSymbol_0"); var x = new Sammy.Sammy(); ~~~~~ -!!! error TS2691: Cannot find name 'Sammy'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'Sammy'. A type exists with this name, but no value. var y = Sammy.Sammy(); ~~~~~ -!!! error TS2691: Cannot find name 'Sammy'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'Sammy'. A type exists with this name, but no value. ==== tests/cases/compiler/errorsOnImportedSymbol_0.ts (0 errors) ==== diff --git a/tests/baselines/reference/es6ExportEqualsInterop.errors.txt b/tests/baselines/reference/es6ExportEqualsInterop.errors.txt index 038449bff1f..e5ca006133b 100644 --- a/tests/baselines/reference/es6ExportEqualsInterop.errors.txt +++ b/tests/baselines/reference/es6ExportEqualsInterop.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/main.ts(15,1): error TS2691: Cannot find name 'z1'. A type exists with this name, but no value. +tests/cases/compiler/main.ts(15,1): error TS2692: Cannot find name 'z1'. A type exists with this name, but no value. tests/cases/compiler/main.ts(21,4): error TS2339: Property 'a' does not exist on type '() => any'. tests/cases/compiler/main.ts(23,4): error TS2339: Property 'a' does not exist on type 'typeof Foo'. tests/cases/compiler/main.ts(27,8): error TS1192: Module '"interface"' has no default export. @@ -49,7 +49,7 @@ tests/cases/compiler/main.ts(106,15): error TS2498: Module '"class-module"' uses z1.a; ~~ -!!! error TS2691: Cannot find name 'z1'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'z1'. A type exists with this name, but no value. z2.a; z3.a; z4.a; diff --git a/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.errors.txt b/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.errors.txt index dc4c48e29ea..2d54bfd7e6d 100644 --- a/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.errors.txt +++ b/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/exportAssignmentOfDeclaredExternalModule_1.ts(3,13): error TS2691: Cannot find name 'Sammy'. A type exists with this name, but no value. -tests/cases/compiler/exportAssignmentOfDeclaredExternalModule_1.ts(4,9): error TS2691: Cannot find name 'Sammy'. A type exists with this name, but no value. +tests/cases/compiler/exportAssignmentOfDeclaredExternalModule_1.ts(3,13): error TS2692: Cannot find name 'Sammy'. A type exists with this name, but no value. +tests/cases/compiler/exportAssignmentOfDeclaredExternalModule_1.ts(4,9): error TS2692: Cannot find name 'Sammy'. A type exists with this name, but no value. ==== tests/cases/compiler/exportAssignmentOfDeclaredExternalModule_1.ts (2 errors) ==== @@ -7,10 +7,10 @@ tests/cases/compiler/exportAssignmentOfDeclaredExternalModule_1.ts(4,9): error T import Sammy = require('./exportAssignmentOfDeclaredExternalModule_0'); var x = new Sammy(); // error to use as constructor as there is not constructor symbol ~~~~~ -!!! error TS2691: Cannot find name 'Sammy'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'Sammy'. A type exists with this name, but no value. var y = Sammy(); // error to use interface name as call target ~~~~~ -!!! error TS2691: Cannot find name 'Sammy'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'Sammy'. A type exists with this name, but no value. var z: Sammy; // no error - z is of type interface Sammy from module 'M' var a = new z(); // constructor - no error var b = z(); // call signature - no error diff --git a/tests/baselines/reference/genericConstructInvocationWithNoTypeArg.errors.txt b/tests/baselines/reference/genericConstructInvocationWithNoTypeArg.errors.txt index 208a354619c..cef121150fb 100644 --- a/tests/baselines/reference/genericConstructInvocationWithNoTypeArg.errors.txt +++ b/tests/baselines/reference/genericConstructInvocationWithNoTypeArg.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/genericConstructInvocationWithNoTypeArg.ts(4,27): error TS2691: Cannot find name 'Foo'. A type exists with this name, but no value. +tests/cases/compiler/genericConstructInvocationWithNoTypeArg.ts(4,27): error TS2692: Cannot find name 'Foo'. A type exists with this name, but no value. ==== tests/cases/compiler/genericConstructInvocationWithNoTypeArg.ts (1 errors) ==== @@ -7,5 +7,5 @@ tests/cases/compiler/genericConstructInvocationWithNoTypeArg.ts(4,27): error TS2 } var f2: Foo = new Foo(3); ~~~ -!!! error TS2691: Cannot find name 'Foo'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'Foo'. A type exists with this name, but no value. \ No newline at end of file diff --git a/tests/baselines/reference/inheritFromGenericTypeParameter.errors.txt b/tests/baselines/reference/inheritFromGenericTypeParameter.errors.txt index 0b958ddce21..86cbc3ac1d6 100644 --- a/tests/baselines/reference/inheritFromGenericTypeParameter.errors.txt +++ b/tests/baselines/reference/inheritFromGenericTypeParameter.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/inheritFromGenericTypeParameter.ts(1,20): error TS2691: Cannot find name 'T'. A type exists with this name, but no value. +tests/cases/compiler/inheritFromGenericTypeParameter.ts(1,20): error TS2692: Cannot find name 'T'. A type exists with this name, but no value. tests/cases/compiler/inheritFromGenericTypeParameter.ts(2,24): error TS2312: An interface may only extend a class or another interface. ==== tests/cases/compiler/inheritFromGenericTypeParameter.ts (2 errors) ==== class C extends T { } ~ -!!! error TS2691: Cannot find name 'T'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'T'. A type exists with this name, but no value. interface I extends T { } ~ !!! error TS2312: An interface may only extend a class or another interface. \ No newline at end of file diff --git a/tests/baselines/reference/intTypeCheck.errors.txt b/tests/baselines/reference/intTypeCheck.errors.txt index 27ee53da1f8..3cd1997dc5a 100644 --- a/tests/baselines/reference/intTypeCheck.errors.txt +++ b/tests/baselines/reference/intTypeCheck.errors.txt @@ -10,7 +10,7 @@ tests/cases/compiler/intTypeCheck.ts(103,5): error TS2322: Type '() => void' is Property 'p' is missing in type '() => void'. tests/cases/compiler/intTypeCheck.ts(106,5): error TS2322: Type 'boolean' is not assignable to type 'i1'. tests/cases/compiler/intTypeCheck.ts(106,20): error TS1109: Expression expected. -tests/cases/compiler/intTypeCheck.ts(106,21): error TS2691: Cannot find name 'i1'. A type exists with this name, but no value. +tests/cases/compiler/intTypeCheck.ts(106,21): error TS2692: Cannot find name 'i1'. A type exists with this name, but no value. tests/cases/compiler/intTypeCheck.ts(107,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(112,5): error TS2322: Type '{}' is not assignable to type 'i2'. Type '{}' provides no match for the signature '(): any' @@ -21,7 +21,7 @@ tests/cases/compiler/intTypeCheck.ts(115,5): error TS2322: Type 'Base' is not as Type 'Base' provides no match for the signature '(): any' tests/cases/compiler/intTypeCheck.ts(120,5): error TS2322: Type 'boolean' is not assignable to type 'i2'. tests/cases/compiler/intTypeCheck.ts(120,21): error TS1109: Expression expected. -tests/cases/compiler/intTypeCheck.ts(120,22): error TS2691: Cannot find name 'i2'. A type exists with this name, but no value. +tests/cases/compiler/intTypeCheck.ts(120,22): error TS2692: Cannot find name 'i2'. A type exists with this name, but no value. tests/cases/compiler/intTypeCheck.ts(121,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(126,5): error TS2322: Type '{}' is not assignable to type 'i3'. Type '{}' provides no match for the signature 'new (): any' @@ -33,12 +33,12 @@ tests/cases/compiler/intTypeCheck.ts(131,5): error TS2322: Type '() => void' is Type '() => void' provides no match for the signature 'new (): any' tests/cases/compiler/intTypeCheck.ts(134,5): error TS2322: Type 'boolean' is not assignable to type 'i3'. tests/cases/compiler/intTypeCheck.ts(134,21): error TS1109: Expression expected. -tests/cases/compiler/intTypeCheck.ts(134,22): error TS2691: Cannot find name 'i3'. A type exists with this name, but no value. +tests/cases/compiler/intTypeCheck.ts(134,22): error TS2692: Cannot find name 'i3'. A type exists with this name, but no value. tests/cases/compiler/intTypeCheck.ts(135,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(142,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(148,5): error TS2322: Type 'boolean' is not assignable to type 'i4'. tests/cases/compiler/intTypeCheck.ts(148,21): error TS1109: Expression expected. -tests/cases/compiler/intTypeCheck.ts(148,22): error TS2691: Cannot find name 'i4'. A type exists with this name, but no value. +tests/cases/compiler/intTypeCheck.ts(148,22): error TS2692: Cannot find name 'i4'. A type exists with this name, but no value. tests/cases/compiler/intTypeCheck.ts(149,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(154,5): error TS2322: Type '{}' is not assignable to type 'i5'. Property 'p' is missing in type '{}'. @@ -51,7 +51,7 @@ tests/cases/compiler/intTypeCheck.ts(159,5): error TS2322: Type '() => void' is Property 'p' is missing in type '() => void'. tests/cases/compiler/intTypeCheck.ts(162,5): error TS2322: Type 'boolean' is not assignable to type 'i5'. tests/cases/compiler/intTypeCheck.ts(162,21): error TS1109: Expression expected. -tests/cases/compiler/intTypeCheck.ts(162,22): error TS2691: Cannot find name 'i5'. A type exists with this name, but no value. +tests/cases/compiler/intTypeCheck.ts(162,22): error TS2692: Cannot find name 'i5'. A type exists with this name, but no value. tests/cases/compiler/intTypeCheck.ts(163,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(168,5): error TS2322: Type '{}' is not assignable to type 'i6'. Type '{}' provides no match for the signature '(): any' @@ -64,7 +64,7 @@ tests/cases/compiler/intTypeCheck.ts(173,5): error TS2322: Type '() => void' is Type 'void' is not assignable to type 'number'. tests/cases/compiler/intTypeCheck.ts(176,5): error TS2322: Type 'boolean' is not assignable to type 'i6'. tests/cases/compiler/intTypeCheck.ts(176,21): error TS1109: Expression expected. -tests/cases/compiler/intTypeCheck.ts(176,22): error TS2691: Cannot find name 'i6'. A type exists with this name, but no value. +tests/cases/compiler/intTypeCheck.ts(176,22): error TS2692: Cannot find name 'i6'. A type exists with this name, but no value. tests/cases/compiler/intTypeCheck.ts(177,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(182,5): error TS2322: Type '{}' is not assignable to type 'i7'. Type '{}' provides no match for the signature 'new (): any' @@ -76,12 +76,12 @@ tests/cases/compiler/intTypeCheck.ts(187,5): error TS2322: Type '() => void' is Type '() => void' provides no match for the signature 'new (): any' tests/cases/compiler/intTypeCheck.ts(190,5): error TS2322: Type 'boolean' is not assignable to type 'i7'. tests/cases/compiler/intTypeCheck.ts(190,21): error TS1109: Expression expected. -tests/cases/compiler/intTypeCheck.ts(190,22): error TS2691: Cannot find name 'i7'. A type exists with this name, but no value. +tests/cases/compiler/intTypeCheck.ts(190,22): error TS2692: Cannot find name 'i7'. A type exists with this name, but no value. tests/cases/compiler/intTypeCheck.ts(191,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(198,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(204,5): error TS2322: Type 'boolean' is not assignable to type 'i8'. tests/cases/compiler/intTypeCheck.ts(204,21): error TS1109: Expression expected. -tests/cases/compiler/intTypeCheck.ts(204,22): error TS2691: Cannot find name 'i8'. A type exists with this name, but no value. +tests/cases/compiler/intTypeCheck.ts(204,22): error TS2692: Cannot find name 'i8'. A type exists with this name, but no value. tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. @@ -214,7 +214,7 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit ~ !!! error TS1109: Expression expected. ~~ -!!! error TS2691: Cannot find name 'i1'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'i1'. A type exists with this name, but no value. var obj10: i1 = new {}; ~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. @@ -247,7 +247,7 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit ~ !!! error TS1109: Expression expected. ~~ -!!! error TS2691: Cannot find name 'i2'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'i2'. A type exists with this name, but no value. var obj21: i2 = new {}; ~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. @@ -281,7 +281,7 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit ~ !!! error TS1109: Expression expected. ~~ -!!! error TS2691: Cannot find name 'i3'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'i3'. A type exists with this name, but no value. var obj32: i3 = new {}; ~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. @@ -305,7 +305,7 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit ~ !!! error TS1109: Expression expected. ~~ -!!! error TS2691: Cannot find name 'i4'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'i4'. A type exists with this name, but no value. var obj43: i4 = new {}; ~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. @@ -341,7 +341,7 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit ~ !!! error TS1109: Expression expected. ~~ -!!! error TS2691: Cannot find name 'i5'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'i5'. A type exists with this name, but no value. var obj54: i5 = new {}; ~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. @@ -377,7 +377,7 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit ~ !!! error TS1109: Expression expected. ~~ -!!! error TS2691: Cannot find name 'i6'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'i6'. A type exists with this name, but no value. var obj65: i6 = new {}; ~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. @@ -411,7 +411,7 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit ~ !!! error TS1109: Expression expected. ~~ -!!! error TS2691: Cannot find name 'i7'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'i7'. A type exists with this name, but no value. var obj76: i7 = new {}; ~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. @@ -435,7 +435,7 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit ~ !!! error TS1109: Expression expected. ~~ -!!! error TS2691: Cannot find name 'i8'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'i8'. A type exists with this name, but no value. var obj87: i8 = new {}; ~~~~~~ !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceNameAsIdentifier.errors.txt b/tests/baselines/reference/interfaceNameAsIdentifier.errors.txt index 48e55e299a1..f3ee47573f7 100644 --- a/tests/baselines/reference/interfaceNameAsIdentifier.errors.txt +++ b/tests/baselines/reference/interfaceNameAsIdentifier.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/interfaceNameAsIdentifier.ts(4,1): error TS2691: Cannot find name 'C'. A type exists with this name, but no value. +tests/cases/compiler/interfaceNameAsIdentifier.ts(4,1): error TS2692: Cannot find name 'C'. A type exists with this name, but no value. tests/cases/compiler/interfaceNameAsIdentifier.ts(12,1): error TS2304: Cannot find name 'm2'. @@ -8,7 +8,7 @@ tests/cases/compiler/interfaceNameAsIdentifier.ts(12,1): error TS2304: Cannot fi } C(); ~ -!!! error TS2691: Cannot find name 'C'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'C'. A type exists with this name, but no value. module m2 { export interface C { diff --git a/tests/baselines/reference/interfaceNaming1.errors.txt b/tests/baselines/reference/interfaceNaming1.errors.txt index 850b458913c..bdd3ca6c1f8 100644 --- a/tests/baselines/reference/interfaceNaming1.errors.txt +++ b/tests/baselines/reference/interfaceNaming1.errors.txt @@ -1,19 +1,19 @@ -tests/cases/compiler/interfaceNaming1.ts(1,1): error TS2691: Cannot find name 'interface'. A type exists with this name, but no value. +tests/cases/compiler/interfaceNaming1.ts(1,1): error TS2692: Cannot find name 'interface'. A type exists with this name, but no value. tests/cases/compiler/interfaceNaming1.ts(1,11): error TS1005: ';' expected. -tests/cases/compiler/interfaceNaming1.ts(3,1): error TS2691: Cannot find name 'interface'. A type exists with this name, but no value. +tests/cases/compiler/interfaceNaming1.ts(3,1): error TS2692: Cannot find name 'interface'. A type exists with this name, but no value. tests/cases/compiler/interfaceNaming1.ts(3,13): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ==== tests/cases/compiler/interfaceNaming1.ts (4 errors) ==== interface { } ~~~~~~~~~ -!!! error TS2691: Cannot find name 'interface'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'interface'. A type exists with this name, but no value. ~ !!! error TS1005: ';' expected. interface interface{ } interface & { } ~~~~~~~~~ -!!! error TS2691: Cannot find name 'interface'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'interface'. A type exists with this name, but no value. ~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/invalidUndefinedAssignments.errors.txt b/tests/baselines/reference/invalidUndefinedAssignments.errors.txt index d04607455fc..2e9f6efb137 100644 --- a/tests/baselines/reference/invalidUndefinedAssignments.errors.txt +++ b/tests/baselines/reference/invalidUndefinedAssignments.errors.txt @@ -1,7 +1,7 @@ tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(4,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(5,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(9,1): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(14,1): error TS2691: Cannot find name 'I'. A type exists with this name, but no value. +tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(14,1): error TS2692: Cannot find name 'I'. A type exists with this name, but no value. tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(17,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(21,1): error TS2364: Invalid left-hand side of assignment expression. @@ -28,7 +28,7 @@ tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.t g = x; I = x; ~ -!!! error TS2691: Cannot find name 'I'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'I'. A type exists with this name, but no value. module M { export var x = 1; } M = x; diff --git a/tests/baselines/reference/modularizeLibrary_ErrorFromUsingES6ArrayWithOnlyES6ArrayLib.errors.txt b/tests/baselines/reference/modularizeLibrary_ErrorFromUsingES6ArrayWithOnlyES6ArrayLib.errors.txt index 48e4d1f9c9f..372d2e797e0 100644 --- a/tests/baselines/reference/modularizeLibrary_ErrorFromUsingES6ArrayWithOnlyES6ArrayLib.errors.txt +++ b/tests/baselines/reference/modularizeLibrary_ErrorFromUsingES6ArrayWithOnlyES6ArrayLib.errors.txt @@ -1,7 +1,7 @@ error TS2318: Cannot find global type 'Boolean'. error TS2318: Cannot find global type 'IArguments'. error TS2318: Cannot find global type 'Number'. -tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6ArrayWithOnlyES6ArrayLib.ts(4,12): error TS2691: Cannot find name 'Array'. A type exists with this name, but no value. +tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6ArrayWithOnlyES6ArrayLib.ts(4,12): error TS2692: Cannot find name 'Array'. A type exists with this name, but no value. !!! error TS2318: Cannot find global type 'Boolean'. @@ -13,7 +13,7 @@ tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6ArrayWithOnlyES6ArrayLib function f(x: number, y: number, z: number) { return Array.from(arguments); ~~~~~ -!!! error TS2691: Cannot find name 'Array'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'Array'. A type exists with this name, but no value. } f(1, 2, 3); diff --git a/tests/baselines/reference/newOperator.errors.txt b/tests/baselines/reference/newOperator.errors.txt index 00d33b13723..e8d834824e5 100644 --- a/tests/baselines/reference/newOperator.errors.txt +++ b/tests/baselines/reference/newOperator.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/newOperator.ts(3,13): error TS2691: Cannot find name 'ifc'. A type exists with this name, but no value. +tests/cases/compiler/newOperator.ts(3,13): error TS2692: Cannot find name 'ifc'. A type exists with this name, but no value. tests/cases/compiler/newOperator.ts(10,10): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/newOperator.ts(11,10): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/newOperator.ts(12,5): error TS2304: Cannot find name 'string'. @@ -17,7 +17,7 @@ tests/cases/compiler/newOperator.ts(45,23): error TS1150: 'new T[]' cannot be us // Attempting to 'new' an interface yields poor error var i = new ifc(); ~~~ -!!! error TS2691: Cannot find name 'ifc'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'ifc'. A type exists with this name, but no value. // Parens are optional var x = new Date; diff --git a/tests/baselines/reference/reservedNamesInAliases.errors.txt b/tests/baselines/reference/reservedNamesInAliases.errors.txt index c999841a322..99dc5137714 100644 --- a/tests/baselines/reference/reservedNamesInAliases.errors.txt +++ b/tests/baselines/reference/reservedNamesInAliases.errors.txt @@ -5,7 +5,7 @@ tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(5,6): error tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,1): error TS2304: Cannot find name 'type'. tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,6): error TS1005: ';' expected. tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,11): error TS1109: Expression expected. -tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,13): error TS2691: Cannot find name 'I'. A type exists with this name, but no value. +tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,13): error TS2692: Cannot find name 'I'. A type exists with this name, but no value. ==== tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts (8 errors) ==== @@ -30,4 +30,4 @@ tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,13): error ~ !!! error TS1109: Expression expected. ~ -!!! error TS2691: Cannot find name 'I'. A type exists with this name, but no value. \ No newline at end of file +!!! error TS2692: Cannot find name 'I'. A type exists with this name, but no value. \ No newline at end of file diff --git a/tests/baselines/reference/returnTypeParameter.errors.txt b/tests/baselines/reference/returnTypeParameter.errors.txt index cfb5d4759ca..7b762f0938a 100644 --- a/tests/baselines/reference/returnTypeParameter.errors.txt +++ b/tests/baselines/reference/returnTypeParameter.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/returnTypeParameter.ts(1,22): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. -tests/cases/compiler/returnTypeParameter.ts(2,34): error TS2691: Cannot find name 'T'. A type exists with this name, but no value. +tests/cases/compiler/returnTypeParameter.ts(2,34): error TS2692: Cannot find name 'T'. A type exists with this name, but no value. ==== tests/cases/compiler/returnTypeParameter.ts (2 errors) ==== @@ -8,4 +8,4 @@ tests/cases/compiler/returnTypeParameter.ts(2,34): error TS2691: Cannot find nam !!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. function f2(a: T): T { return T; } // bug was that this satisfied the return statement requirement ~ -!!! error TS2691: Cannot find name 'T'. A type exists with this name, but no value. \ No newline at end of file +!!! error TS2692: Cannot find name 'T'. A type exists with this name, but no value. \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterAsBaseClass.errors.txt b/tests/baselines/reference/typeParameterAsBaseClass.errors.txt index 2f4d0dd46b9..8254f12cb1c 100644 --- a/tests/baselines/reference/typeParameterAsBaseClass.errors.txt +++ b/tests/baselines/reference/typeParameterAsBaseClass.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/typeParameterAsBaseClass.ts(1,20): error TS2691: Cannot find name 'T'. A type exists with this name, but no value. +tests/cases/compiler/typeParameterAsBaseClass.ts(1,20): error TS2692: Cannot find name 'T'. A type exists with this name, but no value. tests/cases/compiler/typeParameterAsBaseClass.ts(2,24): error TS2422: A class may only implement another class or interface. ==== tests/cases/compiler/typeParameterAsBaseClass.ts (2 errors) ==== class C extends T {} ~ -!!! error TS2691: Cannot find name 'T'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'T'. A type exists with this name, but no value. class C2 implements T {} ~ !!! error TS2422: A class may only implement another class or interface. \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterAsBaseType.errors.txt b/tests/baselines/reference/typeParameterAsBaseType.errors.txt index 7f56299bd6e..f6b82a85681 100644 --- a/tests/baselines/reference/typeParameterAsBaseType.errors.txt +++ b/tests/baselines/reference/typeParameterAsBaseType.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(4,20): error TS2691: Cannot find name 'T'. A type exists with this name, but no value. -tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(5,24): error TS2691: Cannot find name 'U'. A type exists with this name, but no value. +tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(4,20): error TS2692: Cannot find name 'T'. A type exists with this name, but no value. +tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(5,24): error TS2692: Cannot find name 'U'. A type exists with this name, but no value. tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(7,24): error TS2312: An interface may only extend a class or another interface. tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(8,28): error TS2312: An interface may only extend a class or another interface. @@ -10,10 +10,10 @@ tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(8,28): e class C extends T { } ~ -!!! error TS2691: Cannot find name 'T'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'T'. A type exists with this name, but no value. class C2 extends U { } ~ -!!! error TS2691: Cannot find name 'U'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'U'. A type exists with this name, but no value. interface I extends T { } ~ diff --git a/tests/baselines/reference/typeUsedAsValueError.errors.txt b/tests/baselines/reference/typeUsedAsValueError.errors.txt index af637231585..75a83134162 100644 --- a/tests/baselines/reference/typeUsedAsValueError.errors.txt +++ b/tests/baselines/reference/typeUsedAsValueError.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/typeUsedAsValueError.ts(16,11): error TS2691: Cannot find name 'Interface'. A type exists with this name, but no value. +tests/cases/compiler/typeUsedAsValueError.ts(16,11): error TS2692: Cannot find name 'Interface'. A type exists with this name, but no value. tests/cases/compiler/typeUsedAsValueError.ts(17,11): error TS2304: Cannot find name 'InterfaceNotFound'. -tests/cases/compiler/typeUsedAsValueError.ts(18,13): error TS2691: Cannot find name 'TypeAliasForSomeClass'. A type exists with this name, but no value. -tests/cases/compiler/typeUsedAsValueError.ts(19,16): error TS2691: Cannot find name 'TypeAliasForSomeClass'. A type exists with this name, but no value. +tests/cases/compiler/typeUsedAsValueError.ts(18,13): error TS2692: Cannot find name 'TypeAliasForSomeClass'. A type exists with this name, but no value. +tests/cases/compiler/typeUsedAsValueError.ts(19,16): error TS2692: Cannot find name 'TypeAliasForSomeClass'. A type exists with this name, but no value. tests/cases/compiler/typeUsedAsValueError.ts(20,16): error TS2304: Cannot find name 'TypeAliasForSomeClassNotFound'. -tests/cases/compiler/typeUsedAsValueError.ts(21,11): error TS2691: Cannot find name 'someType'. A type exists with this name, but no value. -tests/cases/compiler/typeUsedAsValueError.ts(22,17): error TS2691: Cannot find name 'someType'. A type exists with this name, but no value. +tests/cases/compiler/typeUsedAsValueError.ts(21,11): error TS2692: Cannot find name 'someType'. A type exists with this name, but no value. +tests/cases/compiler/typeUsedAsValueError.ts(22,17): error TS2692: Cannot find name 'someType'. A type exists with this name, but no value. tests/cases/compiler/typeUsedAsValueError.ts(23,17): error TS2304: Cannot find name 'someTypeNotFound'. @@ -26,25 +26,25 @@ tests/cases/compiler/typeUsedAsValueError.ts(23,17): error TS2304: Cannot find n let one = Interface; ~~~~~~~~~ -!!! error TS2691: Cannot find name 'Interface'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'Interface'. A type exists with this name, but no value. let two = InterfaceNotFound; ~~~~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'InterfaceNotFound'. let three = TypeAliasForSomeClass; ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2691: Cannot find name 'TypeAliasForSomeClass'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'TypeAliasForSomeClass'. A type exists with this name, but no value. let four = new TypeAliasForSomeClass(); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2691: Cannot find name 'TypeAliasForSomeClass'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'TypeAliasForSomeClass'. A type exists with this name, but no value. let five = new TypeAliasForSomeClassNotFound(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeAliasForSomeClassNotFound'. let six = someType; ~~~~~~~~ -!!! error TS2691: Cannot find name 'someType'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'someType'. A type exists with this name, but no value. acceptsSomeType(someType); ~~~~~~~~ -!!! error TS2691: Cannot find name 'someType'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'someType'. A type exists with this name, but no value. acceptsSomeType(someTypeNotFound); ~~~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'someTypeNotFound'. \ No newline at end of file diff --git a/tests/baselines/reference/typeUsedAsValueError2.errors.txt b/tests/baselines/reference/typeUsedAsValueError2.errors.txt index 8849a904bdf..8707ffaaafb 100644 --- a/tests/baselines/reference/typeUsedAsValueError2.errors.txt +++ b/tests/baselines/reference/typeUsedAsValueError2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/world.ts(4,1): error TS2691: Cannot find name 'HelloInterface'. A type exists with this name, but no value. +tests/cases/compiler/world.ts(4,1): error TS2692: Cannot find name 'HelloInterface'. A type exists with this name, but no value. tests/cases/compiler/world.ts(5,1): error TS2304: Cannot find name 'HelloNamespace'. @@ -8,7 +8,7 @@ tests/cases/compiler/world.ts(5,1): error TS2304: Cannot find name 'HelloNamespa HelloInterface.world; ~~~~~~~~~~~~~~ -!!! error TS2691: Cannot find name 'HelloInterface'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'HelloInterface'. A type exists with this name, but no value. HelloNamespace.world; ~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'HelloNamespace'. diff --git a/tests/baselines/reference/typeofSimple.errors.txt b/tests/baselines/reference/typeofSimple.errors.txt index 08bbb8ff10c..977a8b34d45 100644 --- a/tests/baselines/reference/typeofSimple.errors.txt +++ b/tests/baselines/reference/typeofSimple.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/typeofSimple.ts(3,5): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/compiler/typeofSimple.ts(8,21): error TS2691: Cannot find name 'J'. A type exists with this name, but no value. +tests/cases/compiler/typeofSimple.ts(8,21): error TS2692: Cannot find name 'J'. A type exists with this name, but no value. ==== tests/cases/compiler/typeofSimple.ts (2 errors) ==== @@ -14,7 +14,7 @@ tests/cases/compiler/typeofSimple.ts(8,21): error TS2691: Cannot find name 'J'. var numberJ: typeof J; //Error, cannot reference type in typeof ~ -!!! error TS2691: Cannot find name 'J'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'J'. A type exists with this name, but no value. var numberI: I; var fun: () => I; diff --git a/tests/baselines/reference/typeofTypeParameter.errors.txt b/tests/baselines/reference/typeofTypeParameter.errors.txt index 7843ee38cc6..a4fc868197d 100644 --- a/tests/baselines/reference/typeofTypeParameter.errors.txt +++ b/tests/baselines/reference/typeofTypeParameter.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/specifyingTypes/typeQueries/typeofTypeParameter.ts(3,19): error TS2691: Cannot find name 'T'. A type exists with this name, but no value. +tests/cases/conformance/types/specifyingTypes/typeQueries/typeofTypeParameter.ts(3,19): error TS2692: Cannot find name 'T'. A type exists with this name, but no value. ==== tests/cases/conformance/types/specifyingTypes/typeQueries/typeofTypeParameter.ts (1 errors) ==== @@ -6,6 +6,6 @@ tests/cases/conformance/types/specifyingTypes/typeQueries/typeofTypeParameter.ts var a: typeof x; var y: typeof T; ~ -!!! error TS2691: Cannot find name 'T'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'T'. A type exists with this name, but no value. return a; } \ No newline at end of file diff --git a/tests/baselines/reference/validNullAssignments.errors.txt b/tests/baselines/reference/validNullAssignments.errors.txt index 7cf05cd9f6c..d3c403b4ae4 100644 --- a/tests/baselines/reference/validNullAssignments.errors.txt +++ b/tests/baselines/reference/validNullAssignments.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/types/primitives/null/validNullAssignments.ts(10,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. tests/cases/conformance/types/primitives/null/validNullAssignments.ts(15,1): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/conformance/types/primitives/null/validNullAssignments.ts(20,1): error TS2691: Cannot find name 'I'. A type exists with this name, but no value. +tests/cases/conformance/types/primitives/null/validNullAssignments.ts(20,1): error TS2692: Cannot find name 'I'. A type exists with this name, but no value. tests/cases/conformance/types/primitives/null/validNullAssignments.ts(23,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/types/primitives/null/validNullAssignments.ts(30,1): error TS2364: Invalid left-hand side of assignment expression. @@ -31,7 +31,7 @@ tests/cases/conformance/types/primitives/null/validNullAssignments.ts(30,1): err g = null; // ok I = null; // error ~ -!!! error TS2691: Cannot find name 'I'. A type exists with this name, but no value. +!!! error TS2692: Cannot find name 'I'. A type exists with this name, but no value. module M { export var x = 1; } M = null; // error