From a72341120799e415b525bc964418965ba21de891 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 30 Sep 2014 13:50:10 -0700 Subject: [PATCH 1/5] Fix reporting duplication errors to report at all declarations --- src/compiler/binder.ts | 9 +++++++-- src/compiler/checker.ts | 18 ++++++++++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 3959335542c..86fdf7bb8f7 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -84,8 +84,13 @@ module ts { if (node.name) { node.name.parent = node; } - file.semanticErrors.push(createDiagnosticForNode(node.name ? node.name : node, - Diagnostics.Duplicate_identifier_0, getDisplayName(node))); + // Report errors every position with duplicate declarations + // Report errors on previous encountered declarations + forEach(symbol.declarations, (declaration) => { + file.semanticErrors.push(createDiagnosticForNode(declaration.name, Diagnostics.Duplicate_identifier_0, getDisplayName(declaration))); + }); + file.semanticErrors.push(createDiagnosticForNode(node, Diagnostics.Duplicate_identifier_0, getDisplayName(node))); + symbol = createSymbol(0, name); } } diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index cf35c1c02f5..0ef10ed8189 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5668,6 +5668,8 @@ module ts { // when checking exported function declarations across modules check only duplicate implementations // names and consistency of modifiers are verified when we check local symbol var isExportSymbolInsideModule = symbol.parent && symbol.parent.flags & SymbolFlags.Module; + var duplicateFunctionDeclaration = false; + var multipleConstructorImplemenation = false; for (var i = 0; i < declarations.length; i++) { var node = declarations[i]; var inAmbientContext = isInAmbientContext(node); @@ -5690,10 +5692,10 @@ module ts { if (node.body && bodyDeclaration) { if (isConstructor) { - error(node, Diagnostics.Multiple_constructor_implementations_are_not_allowed); + multipleConstructorImplemenation = true; } else { - error(node, Diagnostics.Duplicate_function_implementation); + duplicateFunctionDeclaration = true; } } else if (!isExportSymbolInsideModule && previousDeclaration && previousDeclaration.parent === node.parent && previousDeclaration.end !== node.pos) { @@ -5717,6 +5719,18 @@ module ts { } } + if (multipleConstructorImplemenation) { + forEach(declarations, declaration => { + error(declaration, Diagnostics.Multiple_constructor_implementations_are_not_allowed); + }); + } + + if (duplicateFunctionDeclaration) { + forEach( declarations, declaration => { + error(declaration, Diagnostics.Duplicate_function_implementation); + }); + } + if (!isExportSymbolInsideModule && lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body) { reportImplementationExpectedError(lastSeenNonAmbientDeclaration); } From c2d86711e878519fc4789c4966d11e612f28d6e2 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 30 Sep 2014 17:15:18 -0700 Subject: [PATCH 2/5] Update baselines --- src/compiler/binder.ts | 2 +- ...lassStaticFunctionOfTheSameName.errors.txt | 13 +- ...lassStaticFunctionOfTheSameName.errors.txt | 13 +- ...dExportedFunctionThatShareAName.errors.txt | 16 +- ...bleAndExportedVarThatShareAName.errors.txt | 8 +- ...ithExportedClassesOfTheSameName.errors.txt | 8 +- ...ambientClassOverloadForFunction.errors.txt | 9 +- .../baselines/reference/anyDeclare.errors.txt | 9 +- .../reference/augmentedTypesClass.errors.txt | 8 +- .../reference/augmentedTypesClass2.errors.txt | 10 +- .../reference/augmentedTypesClass2.js | 2 +- .../augmentedTypesClass2a.errors.txt | 11 +- .../reference/augmentedTypesClass2a.js | 4 +- .../reference/augmentedTypesClass4.errors.txt | 7 +- .../reference/augmentedTypesClass4.js | 4 +- .../reference/augmentedTypesEnum.errors.txt | 33 +- .../baselines/reference/augmentedTypesEnum.js | 24 +- .../reference/augmentedTypesEnum2.errors.txt | 14 +- .../reference/augmentedTypesEnum2.js | 8 +- .../augmentedTypesFunction.errors.txt | 32 +- .../reference/augmentedTypesFunction.js | 24 +- .../augmentedTypesInterface.errors.txt | 12 +- .../reference/augmentedTypesInterface.js | 4 +- .../augmentedTypesModules.errors.txt | 21 +- .../reference/augmentedTypesModules.js | 18 +- .../reference/augmentedTypesVar.errors.txt | 40 +- .../baselines/reference/augmentedTypesVar.js | 30 +- .../reference/callOnInstance.errors.txt | 9 +- tests/baselines/reference/callOnInstance.js | 4 +- .../reference/callOverloads1.errors.txt | 11 +- tests/baselines/reference/callOverloads1.js | 2 +- .../reference/callOverloads2.errors.txt | 12 +- .../reference/callOverloads3.errors.txt | 8 +- .../reference/callOverloads4.errors.txt | 8 +- .../reference/callOverloads5.errors.txt | 8 +- ...gnaturesWithDuplicateParameters.errors.txt | 94 ++++- ...turesWithParameterInitializers2.errors.txt | 7 +- tests/baselines/reference/class1.errors.txt | 5 +- .../reference/classAndInterface1.errors.txt | 5 +- .../classAndInterfaceWithSameName.errors.txt | 8 +- .../classAndVariableWithSameName.errors.txt | 8 +- .../reference/classCannotExtendVar.errors.txt | 5 +- .../classOverloadForFunction.errors.txt | 9 +- .../classOverloadForFunction2.errors.txt | 5 +- ...ssWithTwoConstructorDefinitions.errors.txt | 8 +- .../reference/clinterfaces.errors.txt | 14 +- .../cloduleWithDuplicateMember1.errors.txt | 16 +- .../cloduleWithDuplicateMember2.errors.txt | 9 +- .../conflictingTypeAnnotatedVar.errors.txt | 13 +- ...ssibilityModifiersOnParameters2.errors.txt | 25 +- .../constructorOverloads1.errors.txt | 13 +- .../constructorOverloads4.errors.txt | 13 +- .../constructorOverloads5.errors.txt | 8 +- .../constructorOverloads7.errors.txt | 16 +- .../constructorOverloads8.errors.txt | 5 +- ...constructorParameterProperties2.errors.txt | 23 +- .../reference/contextualTyping.errors.txt | 16 +- .../baselines/reference/declInput.errors.txt | 5 +- ...faceIncompatibleWithBaseIndexer.errors.txt | 7 +- .../duplicateClassElements.errors.txt | 74 +++- ...duplicateIdentifierInCatchBlock.errors.txt | 19 +- ...ifiersAcrossContainerBoundaries.errors.txt | 11 +- .../duplicateInterfaceMembers1.errors.txt | 7 +- .../duplicateObjectLiteralProperty.errors.txt | 31 +- ...duplicatePropertiesInStrictMode.errors.txt | 7 +- .../duplicatePropertyNames.errors.txt | 50 ++- .../duplicateStringNamedProperty1.errors.txt | 7 +- .../reference/enumGenericTypeClash.errors.txt | 5 +- .../enumIdenticalIdentifierValues.errors.txt | 5 +- .../reference/es6ClassTest9.errors.txt | 9 +- .../exportSameNameFuncVar.errors.txt | 14 +- .../baselines/reference/extension.errors.txt | 5 +- .../fieldAndGetterWithSameName.errors.txt | 9 +- .../baselines/reference/funClodule.errors.txt | 24 +- ...functionAndPropertyNameConflict.errors.txt | 13 +- .../reference/functionCall15.errors.txt | 9 +- .../functionNameConflicts.errors.txt | 25 +- .../functionWithSameNameAsField.errors.txt | 12 +- .../genericClassesRedeclaration.errors.txt | 8 +- ...ReturnTypeAndFunctionClassMerge.errors.txt | 11 +- .../gettersAndSettersErrors.errors.txt | 12 +- tests/baselines/reference/giant.errors.txt | 380 +++++++++++++----- ...AndVariableDeclarationConflict3.errors.txt | 9 +- .../interfaceDeclaration1.errors.txt | 12 +- .../interfaceDeclaration2.errors.txt | 5 +- .../invalidInstantiatedModule.errors.txt | 5 +- .../reference/invalidNestedModules.errors.txt | 5 +- .../lastPropertyInLiteralWins.errors.txt | 12 +- .../reference/memberOverride.errors.txt | 7 +- ...cesWithConflictingPropertyNames.errors.txt | 17 +- ...esWithConflictingPropertyNames2.errors.txt | 23 +- ...matchedClassConstructorVariable.errors.txt | 5 +- ..._augmentExistingAmbientVariable.errors.txt | 5 +- .../module_augmentExistingVariable.errors.txt | 5 +- .../reference/nameCollisions.errors.txt | 34 +- .../reference/numericClassMembers1.errors.txt | 12 +- .../numericNamedPropertyDuplicates.errors.txt | 29 +- ...cStringNamedPropertyEquivalence.errors.txt | 22 +- .../reference/objectLiteralErrors.errors.txt | 218 +++++++--- ...ypeWithDuplicateNumericProperty.errors.txt | 38 +- .../optionalParamArgsTest.errors.txt | 5 +- .../optionalPropertiesSyntax.errors.txt | 7 +- .../overloadsWithinClasses.errors.txt | 5 +- ...parameterPropertyInConstructor2.errors.txt | 9 +- .../reference/parser0_004152.errors.txt | 8 +- ...serErrorRecovery_ModuleElement2.errors.txt | 6 +- ...FunctionDeclarationAmbiguities1.errors.txt | 14 +- ...propertyAndAccessorWithSameName.errors.txt | 35 +- ...propertyAndFunctionWithSameName.errors.txt | 14 +- .../propertyNamedPrototype.errors.txt | 4 +- .../reference/propertySignatures.errors.txt | 7 +- .../reference/reassignStaticProp.errors.txt | 9 +- .../sourceMapValidationEnums.errors.txt | 5 +- .../staticClassMemberError.errors.txt | 5 +- .../staticPrototypeProperty.errors.txt | 8 +- ...ypesInImplementationSignatures2.errors.txt | 7 +- .../stringNamedPropertyDuplicates.errors.txt | 29 +- .../reference/targetTypeCastTest.errors.txt | 14 +- .../reference/targetTypeTest1.errors.txt | 26 +- .../twoAccessorsWithSameName.errors.txt | 27 +- .../twoAccessorsWithSameName2.errors.txt | 16 +- .../varAndFunctionShareName.errors.txt | 9 +- tests/cases/compiler/augmentedTypesClass2.ts | 2 +- tests/cases/compiler/augmentedTypesClass2a.ts | 2 +- tests/cases/compiler/augmentedTypesClass4.ts | 2 +- tests/cases/compiler/augmentedTypesEnum.ts | 12 +- tests/cases/compiler/augmentedTypesEnum2.ts | 6 +- .../cases/compiler/augmentedTypesFunction.ts | 12 +- .../cases/compiler/augmentedTypesInterface.ts | 4 +- tests/cases/compiler/augmentedTypesModules.ts | 10 +- tests/cases/compiler/augmentedTypesVar.ts | 16 +- tests/cases/compiler/callOnInstance.ts | 4 +- tests/cases/compiler/callOverloads1.ts | 2 +- tests/cases/compiler/callOverloads2.ts | 8 +- tests/cases/compiler/callOverloads3.ts | 6 +- tests/cases/compiler/callOverloads4.ts | 6 +- tests/cases/compiler/callOverloads5.ts | 6 +- tests/cases/compiler/class1.ts | 4 +- tests/cases/compiler/classAndInterface1.ts | 2 +- .../classAndVariableWithSameName.ts | 4 +- .../classWithTwoConstructorDefinitions.ts | 4 +- ...allSignaturesWithParameterInitializers2.ts | 4 +- 142 files changed, 1714 insertions(+), 664 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 86fdf7bb8f7..44ebd50c066 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -84,7 +84,7 @@ module ts { if (node.name) { node.name.parent = node; } - // Report errors every position with duplicate declarations + // Report errors every position with duplicate declaration // Report errors on previous encountered declarations forEach(symbol.declarations, (declaration) => { file.semanticErrors.push(createDiagnosticForNode(declaration.name, Diagnostics.Duplicate_identifier_0, getDisplayName(declaration))); diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt index 2ab89730405..ed1c8eaec85 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt @@ -1,21 +1,26 @@ -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts(10,21): error TS2300: Duplicate identifier 'fn'. +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts(5,12): error TS2300: Duplicate identifier 'fn'. +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts(10,5): error TS2300: Duplicate identifier 'fn'. -==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts (1 errors) ==== +==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts (2 errors) ==== class clodule { id: string; value: T; static fn(id: U) { } + ~~ +!!! error TS2300: Duplicate identifier 'fn'. } module clodule { // error: duplicate identifier expected export function fn(x: T, y: T): T { - ~~ -!!! error TS2300: Duplicate identifier 'fn'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ return x; + ~~~~~~~~~~~~~~~~~ } + ~~~~~ +!!! error TS2300: Duplicate identifier 'fn'. } \ No newline at end of file diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt index 5db506d1052..bf1c4f36d1b 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt @@ -1,21 +1,26 @@ -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts(10,21): error TS2300: Duplicate identifier 'fn'. +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts(5,12): error TS2300: Duplicate identifier 'fn'. +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts(10,5): error TS2300: Duplicate identifier 'fn'. -==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts (1 errors) ==== +==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts (2 errors) ==== class clodule { id: string; value: T; static fn(id: string) { } + ~~ +!!! error TS2300: Duplicate identifier 'fn'. } module clodule { // error: duplicate identifier expected export function fn(x: T, y: T): T { - ~~ -!!! error TS2300: Duplicate identifier 'fn'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ return x; + ~~~~~~~~~~~~~~~~~ } + ~~~~~ +!!! error TS2300: Duplicate identifier 'fn'. } \ No newline at end of file diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt index 9b62647f40b..b3c2a87e176 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt @@ -1,17 +1,21 @@ -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(8,21): error TS2300: Duplicate identifier 'Origin'. -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(20,25): error TS2300: Duplicate identifier 'Origin'. +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(4,12): error TS2300: Duplicate identifier 'Origin'. +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(8,5): error TS2300: Duplicate identifier 'Origin'. +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(16,16): error TS2300: Duplicate identifier 'Origin'. +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(20,9): error TS2300: Duplicate identifier 'Origin'. -==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts (2 errors) ==== +==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts (4 errors) ==== class Point { constructor(public x: number, public y: number) { } static Origin(): Point { return { x: 0, y: 0 }; } // unexpected error here bug 840246 + ~~~~~~ +!!! error TS2300: Duplicate identifier 'Origin'. } module Point { export function Origin() { return null; } //expected duplicate identifier error - ~~~~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'Origin'. } @@ -21,11 +25,13 @@ tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMer constructor(public x: number, public y: number) { } static Origin(): Point { return { x: 0, y: 0 }; } // unexpected error here bug 840246 + ~~~~~~ +!!! error TS2300: Duplicate identifier 'Origin'. } export module Point { export function Origin() { return ""; }//expected duplicate identifier error - ~~~~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'Origin'. } } \ No newline at end of file diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.errors.txt index b160146f6f7..88ad9f358be 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.errors.txt @@ -1,12 +1,16 @@ +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(4,12): error TS2300: Duplicate identifier 'Origin'. tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(8,16): error TS2300: Duplicate identifier 'Origin'. +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(16,16): error TS2300: Duplicate identifier 'Origin'. tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(20,20): error TS2300: Duplicate identifier 'Origin'. -==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts (2 errors) ==== +==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts (4 errors) ==== class Point { constructor(public x: number, public y: number) { } static Origin: Point = { x: 0, y: 0 }; + ~~~~~~ +!!! error TS2300: Duplicate identifier 'Origin'. } module Point { @@ -21,6 +25,8 @@ tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMer constructor(public x: number, public y: number) { } static Origin: Point = { x: 0, y: 0 }; + ~~~~~~ +!!! error TS2300: Duplicate identifier 'Origin'. } export module Point { diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt index fd9c4bc0ffe..39e5278041d 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt @@ -1,10 +1,14 @@ +tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(2,18): error TS2300: Duplicate identifier 'Point'. tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(10,18): error TS2300: Duplicate identifier 'Point'. +tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(17,18): error TS2300: Duplicate identifier 'Line'. tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(26,26): error TS2300: Duplicate identifier 'Line'. -==== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts (2 errors) ==== +==== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts (4 errors) ==== module A { export class Point { + ~~~~~ +!!! error TS2300: Duplicate identifier 'Point'. x: number; y: number; } @@ -22,6 +26,8 @@ tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesTha module X.Y.Z { export class Line { + ~~~~ +!!! error TS2300: Duplicate identifier 'Line'. length: number; } } diff --git a/tests/baselines/reference/ambientClassOverloadForFunction.errors.txt b/tests/baselines/reference/ambientClassOverloadForFunction.errors.txt index e7ace55872a..a63f795ec88 100644 --- a/tests/baselines/reference/ambientClassOverloadForFunction.errors.txt +++ b/tests/baselines/reference/ambientClassOverloadForFunction.errors.txt @@ -1,9 +1,12 @@ -tests/cases/compiler/ambientClassOverloadForFunction.ts(2,10): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/ambientClassOverloadForFunction.ts(1,15): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/ambientClassOverloadForFunction.ts(2,1): error TS2300: Duplicate identifier 'foo'. -==== tests/cases/compiler/ambientClassOverloadForFunction.ts (1 errors) ==== +==== tests/cases/compiler/ambientClassOverloadForFunction.ts (2 errors) ==== declare class foo{}; + ~~~ +!!! error TS2300: Duplicate identifier 'foo'. function foo() { return null; } - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/anyDeclare.errors.txt b/tests/baselines/reference/anyDeclare.errors.txt index c9728323818..ec21bd1e859 100644 --- a/tests/baselines/reference/anyDeclare.errors.txt +++ b/tests/baselines/reference/anyDeclare.errors.txt @@ -1,12 +1,15 @@ -tests/cases/compiler/anyDeclare.ts(4,14): error TS2300: Duplicate identifier 'myFn'. +tests/cases/compiler/anyDeclare.ts(3,9): error TS2300: Duplicate identifier 'myFn'. +tests/cases/compiler/anyDeclare.ts(4,5): error TS2300: Duplicate identifier 'myFn'. -==== tests/cases/compiler/anyDeclare.ts (1 errors) ==== +==== tests/cases/compiler/anyDeclare.ts (2 errors) ==== declare var x: any; module myMod { var myFn; + ~~~~ +!!! error TS2300: Duplicate identifier 'myFn'. function myFn() { } - ~~~~ + ~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'myFn'. } \ No newline at end of file diff --git a/tests/baselines/reference/augmentedTypesClass.errors.txt b/tests/baselines/reference/augmentedTypesClass.errors.txt index 16faa14b4c2..2ff6889e22f 100644 --- a/tests/baselines/reference/augmentedTypesClass.errors.txt +++ b/tests/baselines/reference/augmentedTypesClass.errors.txt @@ -1,16 +1,22 @@ +tests/cases/compiler/augmentedTypesClass.ts(2,7): error TS2300: Duplicate identifier 'c1'. tests/cases/compiler/augmentedTypesClass.ts(3,5): error TS2300: Duplicate identifier 'c1'. +tests/cases/compiler/augmentedTypesClass.ts(6,7): error TS2300: Duplicate identifier 'c4'. tests/cases/compiler/augmentedTypesClass.ts(7,6): error TS2300: Duplicate identifier 'c4'. -==== tests/cases/compiler/augmentedTypesClass.ts (2 errors) ==== +==== tests/cases/compiler/augmentedTypesClass.ts (4 errors) ==== //// class then var class c1 { public foo() { } } + ~~ +!!! error TS2300: Duplicate identifier 'c1'. var c1 = 1; // error ~~ !!! error TS2300: Duplicate identifier 'c1'. //// class then enum class c4 { public foo() { } } + ~~ +!!! error TS2300: Duplicate identifier 'c4'. enum c4 { One } // error ~~ !!! error TS2300: Duplicate identifier 'c4'. \ No newline at end of file diff --git a/tests/baselines/reference/augmentedTypesClass2.errors.txt b/tests/baselines/reference/augmentedTypesClass2.errors.txt index 32104b65ac5..5881e49dae9 100644 --- a/tests/baselines/reference/augmentedTypesClass2.errors.txt +++ b/tests/baselines/reference/augmentedTypesClass2.errors.txt @@ -1,12 +1,16 @@ +tests/cases/compiler/augmentedTypesClass2.ts(4,7): error TS2300: Duplicate identifier 'c11'. tests/cases/compiler/augmentedTypesClass2.ts(10,11): error TS2300: Duplicate identifier 'c11'. +tests/cases/compiler/augmentedTypesClass2.ts(16,7): error TS2300: Duplicate identifier 'c33'. tests/cases/compiler/augmentedTypesClass2.ts(21,6): error TS2300: Duplicate identifier 'c33'. -==== tests/cases/compiler/augmentedTypesClass2.ts (2 errors) ==== +==== tests/cases/compiler/augmentedTypesClass2.ts (4 errors) ==== // Checking class with other things in type space not value space // class then interface - class c11 { + class c11 { // error + ~~~ +!!! error TS2300: Duplicate identifier 'c11'. foo() { return 1; } @@ -21,6 +25,8 @@ tests/cases/compiler/augmentedTypesClass2.ts(21,6): error TS2300: Duplicate iden // class then class - covered // class then enum class c33 { + ~~~ +!!! error TS2300: Duplicate identifier 'c33'. foo() { return 1; } diff --git a/tests/baselines/reference/augmentedTypesClass2.js b/tests/baselines/reference/augmentedTypesClass2.js index b4df1672b69..f75c08a5920 100644 --- a/tests/baselines/reference/augmentedTypesClass2.js +++ b/tests/baselines/reference/augmentedTypesClass2.js @@ -2,7 +2,7 @@ // Checking class with other things in type space not value space // class then interface -class c11 { +class c11 { // error foo() { return 1; } diff --git a/tests/baselines/reference/augmentedTypesClass2a.errors.txt b/tests/baselines/reference/augmentedTypesClass2a.errors.txt index 74dece080a6..ed6c556a826 100644 --- a/tests/baselines/reference/augmentedTypesClass2a.errors.txt +++ b/tests/baselines/reference/augmentedTypesClass2a.errors.txt @@ -1,12 +1,15 @@ -tests/cases/compiler/augmentedTypesClass2a.ts(3,10): error TS2300: Duplicate identifier 'c2'. +tests/cases/compiler/augmentedTypesClass2a.ts(2,7): error TS2300: Duplicate identifier 'c2'. +tests/cases/compiler/augmentedTypesClass2a.ts(3,1): error TS2300: Duplicate identifier 'c2'. tests/cases/compiler/augmentedTypesClass2a.ts(4,5): error TS2300: Duplicate identifier 'c2'. -==== tests/cases/compiler/augmentedTypesClass2a.ts (2 errors) ==== +==== tests/cases/compiler/augmentedTypesClass2a.ts (3 errors) ==== //// class then function - class c2 { public foo() { } } + class c2 { public foo() { } } // error + ~~ +!!! error TS2300: Duplicate identifier 'c2'. function c2() { } // error - ~~ + ~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'c2'. var c2 = () => { } ~~ diff --git a/tests/baselines/reference/augmentedTypesClass2a.js b/tests/baselines/reference/augmentedTypesClass2a.js index cca45c2c0b3..fe31f0964c2 100644 --- a/tests/baselines/reference/augmentedTypesClass2a.js +++ b/tests/baselines/reference/augmentedTypesClass2a.js @@ -1,6 +1,6 @@ //// [augmentedTypesClass2a.ts] //// class then function -class c2 { public foo() { } } +class c2 { public foo() { } } // error function c2() { } // error var c2 = () => { } @@ -12,7 +12,7 @@ var c2 = (function () { c2.prototype.foo = function () { }; return c2; -})(); +})(); // error function c2() { } // error var c2 = function () { diff --git a/tests/baselines/reference/augmentedTypesClass4.errors.txt b/tests/baselines/reference/augmentedTypesClass4.errors.txt index 2df0a95ccd2..6df027ca511 100644 --- a/tests/baselines/reference/augmentedTypesClass4.errors.txt +++ b/tests/baselines/reference/augmentedTypesClass4.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/augmentedTypesClass4.ts(2,7): error TS2300: Duplicate identifier 'c3'. tests/cases/compiler/augmentedTypesClass4.ts(3,7): error TS2300: Duplicate identifier 'c3'. -==== tests/cases/compiler/augmentedTypesClass4.ts (1 errors) ==== +==== tests/cases/compiler/augmentedTypesClass4.ts (2 errors) ==== //// class then class - class c3 { public foo() { } } + class c3 { public foo() { } } // error + ~~ +!!! error TS2300: Duplicate identifier 'c3'. class c3 { public bar() { } } // error ~~ !!! error TS2300: Duplicate identifier 'c3'. diff --git a/tests/baselines/reference/augmentedTypesClass4.js b/tests/baselines/reference/augmentedTypesClass4.js index c4e104e714b..71fc61d6659 100644 --- a/tests/baselines/reference/augmentedTypesClass4.js +++ b/tests/baselines/reference/augmentedTypesClass4.js @@ -1,6 +1,6 @@ //// [augmentedTypesClass4.ts] //// class then class -class c3 { public foo() { } } +class c3 { public foo() { } } // error class c3 { public bar() { } } // error @@ -12,7 +12,7 @@ var c3 = (function () { c3.prototype.foo = function () { }; return c3; -})(); +})(); // error var c3 = (function () { function c3() { } diff --git a/tests/baselines/reference/augmentedTypesEnum.errors.txt b/tests/baselines/reference/augmentedTypesEnum.errors.txt index 374ca14093b..6e04f9bfcf1 100644 --- a/tests/baselines/reference/augmentedTypesEnum.errors.txt +++ b/tests/baselines/reference/augmentedTypesEnum.errors.txt @@ -1,43 +1,58 @@ +tests/cases/compiler/augmentedTypesEnum.ts(2,6): error TS2300: Duplicate identifier 'e1111'. tests/cases/compiler/augmentedTypesEnum.ts(3,5): error TS2300: Duplicate identifier 'e1111'. -tests/cases/compiler/augmentedTypesEnum.ts(7,10): error TS2300: Duplicate identifier 'e2'. +tests/cases/compiler/augmentedTypesEnum.ts(6,6): error TS2300: Duplicate identifier 'e2'. +tests/cases/compiler/augmentedTypesEnum.ts(7,1): error TS2300: Duplicate identifier 'e2'. +tests/cases/compiler/augmentedTypesEnum.ts(9,6): error TS2300: Duplicate identifier 'e3'. tests/cases/compiler/augmentedTypesEnum.ts(10,5): error TS2300: Duplicate identifier 'e3'. +tests/cases/compiler/augmentedTypesEnum.ts(13,6): error TS2300: Duplicate identifier 'e4'. tests/cases/compiler/augmentedTypesEnum.ts(14,7): error TS2300: Duplicate identifier 'e4'. tests/cases/compiler/augmentedTypesEnum.ts(18,11): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +tests/cases/compiler/augmentedTypesEnum.ts(20,12): error TS2300: Duplicate identifier 'One'. tests/cases/compiler/augmentedTypesEnum.ts(21,12): error TS2300: Duplicate identifier 'One'. tests/cases/compiler/augmentedTypesEnum.ts(21,12): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. -==== tests/cases/compiler/augmentedTypesEnum.ts (7 errors) ==== +==== tests/cases/compiler/augmentedTypesEnum.ts (12 errors) ==== // enum then var - enum e1111 { One } + enum e1111 { One } // error + ~~~~~ +!!! error TS2300: Duplicate identifier 'e1111'. var e1111 = 1; // error ~~~~~ !!! error TS2300: Duplicate identifier 'e1111'. // enum then function - enum e2 { One } + enum e2 { One } // error + ~~ +!!! error TS2300: Duplicate identifier 'e2'. function e2() { } // error - ~~ + ~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'e2'. - enum e3 { One } + enum e3 { One } // error + ~~ +!!! error TS2300: Duplicate identifier 'e3'. var e3 = () => { } // error ~~ !!! error TS2300: Duplicate identifier 'e3'. // enum then class - enum e4 { One } + enum e4 { One } // error + ~~ +!!! error TS2300: Duplicate identifier 'e4'. class e4 { public foo() { } } // error ~~ !!! error TS2300: Duplicate identifier 'e4'. // enum then enum enum e5 { One } - enum e5 { Two } + enum e5 { Two } // error ~~~ !!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. - enum e5a { One } + enum e5a { One } // error + ~~~ +!!! error TS2300: Duplicate identifier 'One'. enum e5a { One } // error ~~~ !!! error TS2300: Duplicate identifier 'One'. diff --git a/tests/baselines/reference/augmentedTypesEnum.js b/tests/baselines/reference/augmentedTypesEnum.js index 8422b99798b..f7a83018cfd 100644 --- a/tests/baselines/reference/augmentedTypesEnum.js +++ b/tests/baselines/reference/augmentedTypesEnum.js @@ -1,24 +1,24 @@ //// [augmentedTypesEnum.ts] // enum then var -enum e1111 { One } +enum e1111 { One } // error var e1111 = 1; // error // enum then function -enum e2 { One } +enum e2 { One } // error function e2() { } // error -enum e3 { One } +enum e3 { One } // error var e3 = () => { } // error // enum then class -enum e4 { One } +enum e4 { One } // error class e4 { public foo() { } } // error // enum then enum enum e5 { One } -enum e5 { Two } +enum e5 { Two } // error -enum e5a { One } +enum e5a { One } // error enum e5a { One } // error // enum then internal module @@ -40,26 +40,26 @@ module e6b { export var y = 2; } // should be error var e1111; (function (e1111) { e1111[e1111["One"] = 0] = "One"; -})(e1111 || (e1111 = {})); +})(e1111 || (e1111 = {})); // error var e1111 = 1; // error // enum then function var e2; (function (e2) { e2[e2["One"] = 0] = "One"; -})(e2 || (e2 = {})); +})(e2 || (e2 = {})); // error function e2() { } // error var e3; (function (e3) { e3[e3["One"] = 0] = "One"; -})(e3 || (e3 = {})); +})(e3 || (e3 = {})); // error var e3 = function () { }; // error // enum then class var e4; (function (e4) { e4[e4["One"] = 0] = "One"; -})(e4 || (e4 = {})); +})(e4 || (e4 = {})); // error var e4 = (function () { function e4() { } @@ -75,11 +75,11 @@ var e5; var e5; (function (e5) { e5[e5["Two"] = 0] = "Two"; -})(e5 || (e5 = {})); +})(e5 || (e5 = {})); // error var e5a; (function (e5a) { e5a[e5a["One"] = 0] = "One"; -})(e5a || (e5a = {})); +})(e5a || (e5a = {})); // error var e5a; (function (e5a) { e5a[e5a["One"] = 0] = "One"; diff --git a/tests/baselines/reference/augmentedTypesEnum2.errors.txt b/tests/baselines/reference/augmentedTypesEnum2.errors.txt index 86e155f8772..8c6c7382f85 100644 --- a/tests/baselines/reference/augmentedTypesEnum2.errors.txt +++ b/tests/baselines/reference/augmentedTypesEnum2.errors.txt @@ -1,12 +1,16 @@ +tests/cases/compiler/augmentedTypesEnum2.ts(2,6): error TS2300: Duplicate identifier 'e1'. tests/cases/compiler/augmentedTypesEnum2.ts(4,11): error TS2300: Duplicate identifier 'e1'. +tests/cases/compiler/augmentedTypesEnum2.ts(11,6): error TS2300: Duplicate identifier 'e2'. tests/cases/compiler/augmentedTypesEnum2.ts(12,7): error TS2300: Duplicate identifier 'e2'. -==== tests/cases/compiler/augmentedTypesEnum2.ts (2 errors) ==== +==== tests/cases/compiler/augmentedTypesEnum2.ts (4 errors) ==== // enum then interface - enum e1 { One } + enum e1 { One } // error + ~~ +!!! error TS2300: Duplicate identifier 'e1'. - interface e1 { + interface e1 { // error ~~ !!! error TS2300: Duplicate identifier 'e1'. foo(): void; @@ -15,7 +19,9 @@ tests/cases/compiler/augmentedTypesEnum2.ts(12,7): error TS2300: Duplicate ident // interface then enum works // enum then class - enum e2 { One }; + enum e2 { One }; // error + ~~ +!!! error TS2300: Duplicate identifier 'e2'. class e2 { // error ~~ !!! error TS2300: Duplicate identifier 'e2'. diff --git a/tests/baselines/reference/augmentedTypesEnum2.js b/tests/baselines/reference/augmentedTypesEnum2.js index 13656b33411..8ab98a7cb7b 100644 --- a/tests/baselines/reference/augmentedTypesEnum2.js +++ b/tests/baselines/reference/augmentedTypesEnum2.js @@ -1,15 +1,15 @@ //// [augmentedTypesEnum2.ts] // enum then interface -enum e1 { One } +enum e1 { One } // error -interface e1 { +interface e1 { // error foo(): void; } // interface then enum works // enum then class -enum e2 { One }; +enum e2 { One }; // error class e2 { // error foo() { return 1; @@ -24,7 +24,7 @@ class e2 { // error var e1; (function (e1) { e1[e1["One"] = 0] = "One"; -})(e1 || (e1 = {})); +})(e1 || (e1 = {})); // error // interface then enum works // enum then class var e2; diff --git a/tests/baselines/reference/augmentedTypesFunction.errors.txt b/tests/baselines/reference/augmentedTypesFunction.errors.txt index ba324349c65..60d6dd3b30d 100644 --- a/tests/baselines/reference/augmentedTypesFunction.errors.txt +++ b/tests/baselines/reference/augmentedTypesFunction.errors.txt @@ -1,42 +1,60 @@ +tests/cases/compiler/augmentedTypesFunction.ts(2,10): error TS2300: Duplicate identifier 'y1'. tests/cases/compiler/augmentedTypesFunction.ts(3,5): error TS2300: Duplicate identifier 'y1'. +tests/cases/compiler/augmentedTypesFunction.ts(6,1): error TS2393: Duplicate function implementation. tests/cases/compiler/augmentedTypesFunction.ts(7,1): error TS2393: Duplicate function implementation. +tests/cases/compiler/augmentedTypesFunction.ts(9,10): error TS2300: Duplicate identifier 'y2a'. tests/cases/compiler/augmentedTypesFunction.ts(10,5): error TS2300: Duplicate identifier 'y2a'. +tests/cases/compiler/augmentedTypesFunction.ts(13,10): error TS2300: Duplicate identifier 'y3'. tests/cases/compiler/augmentedTypesFunction.ts(14,7): error TS2300: Duplicate identifier 'y3'. +tests/cases/compiler/augmentedTypesFunction.ts(16,10): error TS2300: Duplicate identifier 'y3a'. tests/cases/compiler/augmentedTypesFunction.ts(17,7): error TS2300: Duplicate identifier 'y3a'. +tests/cases/compiler/augmentedTypesFunction.ts(20,10): error TS2300: Duplicate identifier 'y4'. tests/cases/compiler/augmentedTypesFunction.ts(21,6): error TS2300: Duplicate identifier 'y4'. -==== tests/cases/compiler/augmentedTypesFunction.ts (6 errors) ==== +==== tests/cases/compiler/augmentedTypesFunction.ts (12 errors) ==== // function then var - function y1() { } + function y1() { } // error + ~~ +!!! error TS2300: Duplicate identifier 'y1'. var y1 = 1; // error ~~ !!! error TS2300: Duplicate identifier 'y1'. // function then function - function y2() { } + function y2() { } // error + ~~~~~~~~~~~~~~~~~ +!!! error TS2393: Duplicate function implementation. function y2() { } // error ~~~~~~~~~~~~~~~~~ !!! error TS2393: Duplicate function implementation. - function y2a() { } + function y2a() { } // error + ~~~ +!!! error TS2300: Duplicate identifier 'y2a'. var y2a = () => { } // error ~~~ !!! error TS2300: Duplicate identifier 'y2a'. // function then class - function y3() { } + function y3() { } // error + ~~ +!!! error TS2300: Duplicate identifier 'y3'. class y3 { } // error ~~ !!! error TS2300: Duplicate identifier 'y3'. - function y3a() { } + function y3a() { } // error + ~~~ +!!! error TS2300: Duplicate identifier 'y3a'. class y3a { public foo() { } } // error ~~~ !!! error TS2300: Duplicate identifier 'y3a'. // function then enum - function y4() { } + function y4() { } // error + ~~ +!!! error TS2300: Duplicate identifier 'y4'. enum y4 { One } // error ~~ !!! error TS2300: Duplicate identifier 'y4'. diff --git a/tests/baselines/reference/augmentedTypesFunction.js b/tests/baselines/reference/augmentedTypesFunction.js index 097482c7c5b..078854e227c 100644 --- a/tests/baselines/reference/augmentedTypesFunction.js +++ b/tests/baselines/reference/augmentedTypesFunction.js @@ -1,24 +1,24 @@ //// [augmentedTypesFunction.ts] // function then var -function y1() { } +function y1() { } // error var y1 = 1; // error // function then function -function y2() { } +function y2() { } // error function y2() { } // error -function y2a() { } +function y2a() { } // error var y2a = () => { } // error // function then class -function y3() { } +function y3() { } // error class y3 { } // error -function y3a() { } +function y3a() { } // error class y3a { public foo() { } } // error // function then enum -function y4() { } +function y4() { } // error enum y4 { One } // error // function then internal module @@ -41,27 +41,27 @@ module y5c { export interface I { foo(): void } } // should be an error //// [augmentedTypesFunction.js] // function then var function y1() { -} +} // error var y1 = 1; // error // function then function function y2() { -} +} // error function y2() { } // error function y2a() { -} +} // error var y2a = function () { }; // error // function then class function y3() { -} +} // error var y3 = (function () { function y3() { } return y3; })(); // error function y3a() { -} +} // error var y3a = (function () { function y3a() { } @@ -71,7 +71,7 @@ var y3a = (function () { })(); // error // function then enum function y4() { -} +} // error var y4; (function (y4) { y4[y4["One"] = 0] = "One"; diff --git a/tests/baselines/reference/augmentedTypesInterface.errors.txt b/tests/baselines/reference/augmentedTypesInterface.errors.txt index 77a7fa64eed..a9fc28dd5ae 100644 --- a/tests/baselines/reference/augmentedTypesInterface.errors.txt +++ b/tests/baselines/reference/augmentedTypesInterface.errors.txt @@ -1,8 +1,10 @@ +tests/cases/compiler/augmentedTypesInterface.ts(12,11): error TS2300: Duplicate identifier 'i2'. tests/cases/compiler/augmentedTypesInterface.ts(16,7): error TS2300: Duplicate identifier 'i2'. +tests/cases/compiler/augmentedTypesInterface.ts(23,11): error TS2300: Duplicate identifier 'i3'. tests/cases/compiler/augmentedTypesInterface.ts(26,6): error TS2300: Duplicate identifier 'i3'. -==== tests/cases/compiler/augmentedTypesInterface.ts (2 errors) ==== +==== tests/cases/compiler/augmentedTypesInterface.ts (4 errors) ==== // interface then interface interface i { @@ -14,7 +16,9 @@ tests/cases/compiler/augmentedTypesInterface.ts(26,6): error TS2300: Duplicate i } // interface then class - interface i2 { + interface i2 { // error + ~~ +!!! error TS2300: Duplicate identifier 'i2'. foo(): void; } @@ -27,7 +31,9 @@ tests/cases/compiler/augmentedTypesInterface.ts(26,6): error TS2300: Duplicate i } // interface then enum - interface i3 { + interface i3 { // error + ~~ +!!! error TS2300: Duplicate identifier 'i3'. foo(): void; } enum i3 { One }; // error diff --git a/tests/baselines/reference/augmentedTypesInterface.js b/tests/baselines/reference/augmentedTypesInterface.js index 5c68ba9a744..709b16d615c 100644 --- a/tests/baselines/reference/augmentedTypesInterface.js +++ b/tests/baselines/reference/augmentedTypesInterface.js @@ -10,7 +10,7 @@ interface i { } // interface then class -interface i2 { +interface i2 { // error foo(): void; } @@ -21,7 +21,7 @@ class i2 { // error } // interface then enum -interface i3 { +interface i3 { // error foo(): void; } enum i3 { One }; // error diff --git a/tests/baselines/reference/augmentedTypesModules.errors.txt b/tests/baselines/reference/augmentedTypesModules.errors.txt index 75b1973525d..980837a18ef 100644 --- a/tests/baselines/reference/augmentedTypesModules.errors.txt +++ b/tests/baselines/reference/augmentedTypesModules.errors.txt @@ -1,23 +1,30 @@ +tests/cases/compiler/augmentedTypesModules.ts(5,8): error TS2300: Duplicate identifier 'm1a'. tests/cases/compiler/augmentedTypesModules.ts(6,5): error TS2300: Duplicate identifier 'm1a'. +tests/cases/compiler/augmentedTypesModules.ts(8,8): error TS2300: Duplicate identifier 'm1b'. tests/cases/compiler/augmentedTypesModules.ts(9,5): error TS2300: Duplicate identifier 'm1b'. +tests/cases/compiler/augmentedTypesModules.ts(16,8): error TS2300: Duplicate identifier 'm1d'. tests/cases/compiler/augmentedTypesModules.ts(19,5): error TS2300: Duplicate identifier 'm1d'. tests/cases/compiler/augmentedTypesModules.ts(25,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged tests/cases/compiler/augmentedTypesModules.ts(28,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged -==== tests/cases/compiler/augmentedTypesModules.ts (6 errors) ==== +==== tests/cases/compiler/augmentedTypesModules.ts (9 errors) ==== // module then var module m1 { } var m1 = 1; // Should be allowed - module m1a { var y = 2; } - var m1a = 1; + module m1a { var y = 2; } // error + ~~~ +!!! error TS2300: Duplicate identifier 'm1a'. + var m1a = 1; // error ~~~ !!! error TS2300: Duplicate identifier 'm1a'. - module m1b { export var y = 2; } - var m1b = 1; + module m1b { export var y = 2; } // error + ~~~ +!!! error TS2300: Duplicate identifier 'm1b'. + var m1b = 1; // error ~~~ !!! error TS2300: Duplicate identifier 'm1b'. @@ -26,7 +33,9 @@ tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A module decl } var m1c = 1; // Should be allowed - module m1d { + module m1d { // error + ~~~ +!!! error TS2300: Duplicate identifier 'm1d'. export class I { foo() { } } } var m1d = 1; // error diff --git a/tests/baselines/reference/augmentedTypesModules.js b/tests/baselines/reference/augmentedTypesModules.js index 5085b1cbda3..0c7967b2227 100644 --- a/tests/baselines/reference/augmentedTypesModules.js +++ b/tests/baselines/reference/augmentedTypesModules.js @@ -3,18 +3,18 @@ module m1 { } var m1 = 1; // Should be allowed -module m1a { var y = 2; } -var m1a = 1; +module m1a { var y = 2; } // error +var m1a = 1; // error -module m1b { export var y = 2; } -var m1b = 1; +module m1b { export var y = 2; } // error +var m1b = 1; // error module m1c { export interface I { foo(): void; } } var m1c = 1; // Should be allowed -module m1d { +module m1d { // error export class I { foo() { } } } var m1d = 1; // error @@ -102,13 +102,13 @@ var m1 = 1; // Should be allowed var m1a; (function (m1a) { var y = 2; -})(m1a || (m1a = {})); -var m1a = 1; +})(m1a || (m1a = {})); // error +var m1a = 1; // error var m1b; (function (m1b) { m1b.y = 2; -})(m1b || (m1b = {})); -var m1b = 1; +})(m1b || (m1b = {})); // error +var m1b = 1; // error var m1c = 1; // Should be allowed var m1d; (function (m1d) { diff --git a/tests/baselines/reference/augmentedTypesVar.errors.txt b/tests/baselines/reference/augmentedTypesVar.errors.txt index 9f3980e39bc..ee4319baffb 100644 --- a/tests/baselines/reference/augmentedTypesVar.errors.txt +++ b/tests/baselines/reference/augmentedTypesVar.errors.txt @@ -1,41 +1,55 @@ -tests/cases/compiler/augmentedTypesVar.ts(7,10): error TS2300: Duplicate identifier 'x2'. +tests/cases/compiler/augmentedTypesVar.ts(6,5): error TS2300: Duplicate identifier 'x2'. +tests/cases/compiler/augmentedTypesVar.ts(7,1): error TS2300: Duplicate identifier 'x2'. tests/cases/compiler/augmentedTypesVar.ts(10,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x3' must be of type 'number', but here has type '() => void'. +tests/cases/compiler/augmentedTypesVar.ts(13,5): error TS2300: Duplicate identifier 'x4'. tests/cases/compiler/augmentedTypesVar.ts(14,7): error TS2300: Duplicate identifier 'x4'. +tests/cases/compiler/augmentedTypesVar.ts(16,5): error TS2300: Duplicate identifier 'x4a'. tests/cases/compiler/augmentedTypesVar.ts(17,7): error TS2300: Duplicate identifier 'x4a'. +tests/cases/compiler/augmentedTypesVar.ts(20,5): error TS2300: Duplicate identifier 'x5'. tests/cases/compiler/augmentedTypesVar.ts(21,6): error TS2300: Duplicate identifier 'x5'. +tests/cases/compiler/augmentedTypesVar.ts(27,5): error TS2300: Duplicate identifier 'x6a'. tests/cases/compiler/augmentedTypesVar.ts(28,8): error TS2300: Duplicate identifier 'x6a'. +tests/cases/compiler/augmentedTypesVar.ts(30,5): error TS2300: Duplicate identifier 'x6b'. tests/cases/compiler/augmentedTypesVar.ts(31,8): error TS2300: Duplicate identifier 'x6b'. -==== tests/cases/compiler/augmentedTypesVar.ts (7 errors) ==== +==== tests/cases/compiler/augmentedTypesVar.ts (13 errors) ==== // var then var var x1 = 1; var x1 = 2; // var then function - var x2 = 1; - function x2() { } // should be an error - ~~ + var x2 = 1; // error + ~~ +!!! error TS2300: Duplicate identifier 'x2'. + function x2() { } // error + ~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x2'. - var x3 = 1; - var x3 = () => { } // should be an error + var x3 = 1; + var x3 = () => { } // error ~~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x3' must be of type 'number', but here has type '() => void'. // var then class - var x4 = 1; + var x4 = 1; // error + ~~ +!!! error TS2300: Duplicate identifier 'x4'. class x4 { } // error ~~ !!! error TS2300: Duplicate identifier 'x4'. - var x4a = 1; + var x4a = 1; // error + ~~~ +!!! error TS2300: Duplicate identifier 'x4a'. class x4a { public foo() { } } // error ~~~ !!! error TS2300: Duplicate identifier 'x4a'. // var then enum var x5 = 1; + ~~ +!!! error TS2300: Duplicate identifier 'x5'. enum x5 { One } // error ~~ !!! error TS2300: Duplicate identifier 'x5'. @@ -44,12 +58,16 @@ tests/cases/compiler/augmentedTypesVar.ts(31,8): error TS2300: Duplicate identif var x6 = 1; module x6 { } // ok since non-instantiated - var x6a = 1; + var x6a = 1; // error + ~~~ +!!! error TS2300: Duplicate identifier 'x6a'. module x6a { var y = 2; } // error since instantiated ~~~ !!! error TS2300: Duplicate identifier 'x6a'. - var x6b = 1; + var x6b = 1; // error + ~~~ +!!! error TS2300: Duplicate identifier 'x6b'. module x6b { export var y = 2; } // error ~~~ !!! error TS2300: Duplicate identifier 'x6b'. diff --git a/tests/baselines/reference/augmentedTypesVar.js b/tests/baselines/reference/augmentedTypesVar.js index ca50b8ab9a9..4735d647056 100644 --- a/tests/baselines/reference/augmentedTypesVar.js +++ b/tests/baselines/reference/augmentedTypesVar.js @@ -4,17 +4,17 @@ var x1 = 1; var x1 = 2; // var then function -var x2 = 1; -function x2() { } // should be an error +var x2 = 1; // error +function x2() { } // error -var x3 = 1; -var x3 = () => { } // should be an error +var x3 = 1; +var x3 = () => { } // error // var then class -var x4 = 1; +var x4 = 1; // error class x4 { } // error -var x4a = 1; +var x4a = 1; // error class x4a { public foo() { } } // error // var then enum @@ -25,10 +25,10 @@ enum x5 { One } // error var x6 = 1; module x6 { } // ok since non-instantiated -var x6a = 1; +var x6a = 1; // error module x6a { var y = 2; } // error since instantiated -var x6b = 1; +var x6b = 1; // error module x6b { export var y = 2; } // error // var then import, messes with other error reporting @@ -41,20 +41,20 @@ module x6b { export var y = 2; } // error var x1 = 1; var x1 = 2; // var then function -var x2 = 1; +var x2 = 1; // error function x2() { -} // should be an error +} // error var x3 = 1; var x3 = function () { -}; // should be an error +}; // error // var then class -var x4 = 1; +var x4 = 1; // error var x4 = (function () { function x4() { } return x4; })(); // error -var x4a = 1; +var x4a = 1; // error var x4a = (function () { function x4a() { } @@ -70,12 +70,12 @@ var x5; })(x5 || (x5 = {})); // error // var then module var x6 = 1; -var x6a = 1; +var x6a = 1; // error var x6a; (function (x6a) { var y = 2; })(x6a || (x6a = {})); // error since instantiated -var x6b = 1; +var x6b = 1; // error var x6b; (function (x6b) { x6b.y = 2; diff --git a/tests/baselines/reference/callOnInstance.errors.txt b/tests/baselines/reference/callOnInstance.errors.txt index c1861d05377..156bdfd512a 100644 --- a/tests/baselines/reference/callOnInstance.errors.txt +++ b/tests/baselines/reference/callOnInstance.errors.txt @@ -1,13 +1,16 @@ +tests/cases/compiler/callOnInstance.ts(1,18): error TS2300: Duplicate identifier 'D'. tests/cases/compiler/callOnInstance.ts(3,15): error TS2300: Duplicate identifier 'D'. tests/cases/compiler/callOnInstance.ts(7,19): error TS2346: Supplied parameters do not match any signature of call target. tests/cases/compiler/callOnInstance.ts(7,19): error TS2350: Only a void function can be called with the 'new' keyword. tests/cases/compiler/callOnInstance.ts(10,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. -==== tests/cases/compiler/callOnInstance.ts (4 errors) ==== - declare function D(): string; +==== tests/cases/compiler/callOnInstance.ts (5 errors) ==== + declare function D(): string; // error + ~ +!!! error TS2300: Duplicate identifier 'D'. - declare class D { constructor (value: number); } // Duplicate identifier + declare class D { constructor (value: number); } // error ~ !!! error TS2300: Duplicate identifier 'D'. diff --git a/tests/baselines/reference/callOnInstance.js b/tests/baselines/reference/callOnInstance.js index 477bdca26a7..3b07d0affc8 100644 --- a/tests/baselines/reference/callOnInstance.js +++ b/tests/baselines/reference/callOnInstance.js @@ -1,7 +1,7 @@ //// [callOnInstance.ts] -declare function D(): string; +declare function D(): string; // error -declare class D { constructor (value: number); } // Duplicate identifier +declare class D { constructor (value: number); } // error var s1: string = D(); // OK diff --git a/tests/baselines/reference/callOverloads1.errors.txt b/tests/baselines/reference/callOverloads1.errors.txt index 759c00aa7e4..1f778a42cdf 100644 --- a/tests/baselines/reference/callOverloads1.errors.txt +++ b/tests/baselines/reference/callOverloads1.errors.txt @@ -1,10 +1,13 @@ -tests/cases/compiler/callOverloads1.ts(9,10): error TS2300: Duplicate identifier 'Foo'. +tests/cases/compiler/callOverloads1.ts(1,7): error TS2300: Duplicate identifier 'Foo'. +tests/cases/compiler/callOverloads1.ts(9,1): error TS2300: Duplicate identifier 'Foo'. tests/cases/compiler/callOverloads1.ts(9,10): error TS2391: Function implementation is missing or not immediately following the declaration. tests/cases/compiler/callOverloads1.ts(17,1): error TS2348: Value of type 'typeof Foo' is not callable. Did you mean to include 'new'? -==== tests/cases/compiler/callOverloads1.ts (3 errors) ==== - class Foo { +==== tests/cases/compiler/callOverloads1.ts (4 errors) ==== + class Foo { // error + ~~~ +!!! error TS2300: Duplicate identifier 'Foo'. bar1() { /*WScript.Echo("bar1");*/ } constructor(x: any) { @@ -13,7 +16,7 @@ tests/cases/compiler/callOverloads1.ts(17,1): error TS2348: Value of type 'typeo } function Foo(); // error - ~~~ + ~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'Foo'. ~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. diff --git a/tests/baselines/reference/callOverloads1.js b/tests/baselines/reference/callOverloads1.js index dc76fcba98a..86cb951f853 100644 --- a/tests/baselines/reference/callOverloads1.js +++ b/tests/baselines/reference/callOverloads1.js @@ -1,5 +1,5 @@ //// [callOverloads1.ts] -class Foo { +class Foo { // error bar1() { /*WScript.Echo("bar1");*/ } constructor(x: any) { diff --git a/tests/baselines/reference/callOverloads2.errors.txt b/tests/baselines/reference/callOverloads2.errors.txt index 693b67872eb..3759ae719c9 100644 --- a/tests/baselines/reference/callOverloads2.errors.txt +++ b/tests/baselines/reference/callOverloads2.errors.txt @@ -1,14 +1,18 @@ -tests/cases/compiler/callOverloads2.ts(11,10): error TS2300: Duplicate identifier 'Foo'. +tests/cases/compiler/callOverloads2.ts(3,7): error TS2300: Duplicate identifier 'Foo'. +tests/cases/compiler/callOverloads2.ts(11,1): error TS2300: Duplicate identifier 'Foo'. +tests/cases/compiler/callOverloads2.ts(13,1): error TS2393: Duplicate function implementation. tests/cases/compiler/callOverloads2.ts(13,10): error TS2389: Function implementation name must be 'Foo'. tests/cases/compiler/callOverloads2.ts(14,1): error TS2393: Duplicate function implementation. tests/cases/compiler/callOverloads2.ts(16,10): error TS2391: Function implementation is missing or not immediately following the declaration. tests/cases/compiler/callOverloads2.ts(24,1): error TS2348: Value of type 'typeof Foo' is not callable. Did you mean to include 'new'? -==== tests/cases/compiler/callOverloads2.ts (5 errors) ==== +==== tests/cases/compiler/callOverloads2.ts (7 errors) ==== class Foo { + ~~~ +!!! error TS2300: Duplicate identifier 'Foo'. bar1() { /*WScript.Echo("bar1");*/ } constructor(x: any) { @@ -17,10 +21,12 @@ tests/cases/compiler/callOverloads2.ts(24,1): error TS2348: Value of type 'typeo } function Foo(); - ~~~ + ~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'Foo'. function F1(s:string) {return s;} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2393: Duplicate function implementation. ~~ !!! error TS2389: Function implementation name must be 'Foo'. function F1(a:any) { return a;} // error - duplicate identifier diff --git a/tests/baselines/reference/callOverloads3.errors.txt b/tests/baselines/reference/callOverloads3.errors.txt index 986f0478369..86124251752 100644 --- a/tests/baselines/reference/callOverloads3.errors.txt +++ b/tests/baselines/reference/callOverloads3.errors.txt @@ -1,17 +1,23 @@ +tests/cases/compiler/callOverloads3.ts(2,10): error TS2300: Duplicate identifier 'Foo'. tests/cases/compiler/callOverloads3.ts(2,16): error TS2304: Cannot find name 'Foo'. +tests/cases/compiler/callOverloads3.ts(3,10): error TS2300: Duplicate identifier 'Foo'. tests/cases/compiler/callOverloads3.ts(3,10): error TS2391: Function implementation is missing or not immediately following the declaration. tests/cases/compiler/callOverloads3.ts(3,24): error TS2304: Cannot find name 'Foo'. tests/cases/compiler/callOverloads3.ts(4,7): error TS2300: Duplicate identifier 'Foo'. tests/cases/compiler/callOverloads3.ts(12,10): error TS2350: Only a void function can be called with the 'new' keyword. -==== tests/cases/compiler/callOverloads3.ts (5 errors) ==== +==== tests/cases/compiler/callOverloads3.ts (7 errors) ==== function Foo():Foo; + ~~~ +!!! error TS2300: Duplicate identifier 'Foo'. ~~~ !!! error TS2304: Cannot find name 'Foo'. function Foo(s:string):Foo; ~~~ +!!! error TS2300: Duplicate identifier 'Foo'. + ~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. ~~~ !!! error TS2304: Cannot find name 'Foo'. diff --git a/tests/baselines/reference/callOverloads4.errors.txt b/tests/baselines/reference/callOverloads4.errors.txt index cec3a1834ba..24d304b45c6 100644 --- a/tests/baselines/reference/callOverloads4.errors.txt +++ b/tests/baselines/reference/callOverloads4.errors.txt @@ -1,17 +1,23 @@ +tests/cases/compiler/callOverloads4.ts(2,10): error TS2300: Duplicate identifier 'Foo'. tests/cases/compiler/callOverloads4.ts(2,16): error TS2304: Cannot find name 'Foo'. +tests/cases/compiler/callOverloads4.ts(3,10): error TS2300: Duplicate identifier 'Foo'. tests/cases/compiler/callOverloads4.ts(3,10): error TS2391: Function implementation is missing or not immediately following the declaration. tests/cases/compiler/callOverloads4.ts(3,24): error TS2304: Cannot find name 'Foo'. tests/cases/compiler/callOverloads4.ts(4,7): error TS2300: Duplicate identifier 'Foo'. tests/cases/compiler/callOverloads4.ts(12,10): error TS2350: Only a void function can be called with the 'new' keyword. -==== tests/cases/compiler/callOverloads4.ts (5 errors) ==== +==== tests/cases/compiler/callOverloads4.ts (7 errors) ==== function Foo():Foo; + ~~~ +!!! error TS2300: Duplicate identifier 'Foo'. ~~~ !!! error TS2304: Cannot find name 'Foo'. function Foo(s:string):Foo; ~~~ +!!! error TS2300: Duplicate identifier 'Foo'. + ~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. ~~~ !!! error TS2304: Cannot find name 'Foo'. diff --git a/tests/baselines/reference/callOverloads5.errors.txt b/tests/baselines/reference/callOverloads5.errors.txt index 240e10b9f55..a2a8711d211 100644 --- a/tests/baselines/reference/callOverloads5.errors.txt +++ b/tests/baselines/reference/callOverloads5.errors.txt @@ -1,16 +1,22 @@ +tests/cases/compiler/callOverloads5.ts(1,10): error TS2300: Duplicate identifier 'Foo'. tests/cases/compiler/callOverloads5.ts(1,16): error TS2304: Cannot find name 'Foo'. +tests/cases/compiler/callOverloads5.ts(2,10): error TS2300: Duplicate identifier 'Foo'. tests/cases/compiler/callOverloads5.ts(2,10): error TS2391: Function implementation is missing or not immediately following the declaration. tests/cases/compiler/callOverloads5.ts(2,24): error TS2304: Cannot find name 'Foo'. tests/cases/compiler/callOverloads5.ts(3,7): error TS2300: Duplicate identifier 'Foo'. tests/cases/compiler/callOverloads5.ts(13,10): error TS2350: Only a void function can be called with the 'new' keyword. -==== tests/cases/compiler/callOverloads5.ts (5 errors) ==== +==== tests/cases/compiler/callOverloads5.ts (7 errors) ==== function Foo():Foo; + ~~~ +!!! error TS2300: Duplicate identifier 'Foo'. ~~~ !!! error TS2304: Cannot find name 'Foo'. function Foo(s:string):Foo; ~~~ +!!! error TS2300: Duplicate identifier 'Foo'. + ~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. ~~~ !!! error TS2304: Cannot find name 'Foo'. diff --git a/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt b/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt index ff1fd1e66cf..c87eb32515e 100644 --- a/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt +++ b/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt @@ -1,107 +1,173 @@ +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(3,14): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(3,17): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(4,22): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(4,25): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(5,20): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(5,23): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(6,11): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(6,14): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(7,14): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(7,20): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(9,15): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(9,26): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(10,23): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(10,34): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(11,20): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(11,31): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(12,11): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(12,22): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(16,9): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(16,12): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(17,10): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(17,21): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(18,13): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(18,19): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(22,6): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(22,9): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(23,6): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(23,17): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(24,9): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(24,12): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(25,9): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(25,20): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(26,13): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(26,19): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(30,9): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(30,12): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(31,10): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(31,21): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(35,9): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(35,12): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(36,21): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(36,32): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(37,12): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(37,18): error TS2300: Duplicate identifier 'x'. -==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts (22 errors) ==== +==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts (44 errors) ==== // Duplicate parameter names are always an error function foo(x, x) { } + ~ +!!! error TS2300: Duplicate identifier 'x'. ~ !!! error TS2300: Duplicate identifier 'x'. var f = function foo(x, x) { } + ~ +!!! error TS2300: Duplicate identifier 'x'. ~ !!! error TS2300: Duplicate identifier 'x'. var f2 = function (x, x) { } + ~ +!!! error TS2300: Duplicate identifier 'x'. ~ !!! error TS2300: Duplicate identifier 'x'. var f3 = (x, x) => { } + ~ +!!! error TS2300: Duplicate identifier 'x'. ~ !!! error TS2300: Duplicate identifier 'x'. var f4 = (x: T, x: T) => { } - ~ + ~ +!!! error TS2300: Duplicate identifier 'x'. + ~~~~ !!! error TS2300: Duplicate identifier 'x'. function foo2(x: string, x: number) { } - ~ + ~ +!!! error TS2300: Duplicate identifier 'x'. + ~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. var f5 = function foo(x: string, x: number) { } - ~ + ~ +!!! error TS2300: Duplicate identifier 'x'. + ~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. var f6 = function (x: string, x: number) { } - ~ + ~ +!!! error TS2300: Duplicate identifier 'x'. + ~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. var f7 = (x: string, x: number) => { } - ~ + ~ +!!! error TS2300: Duplicate identifier 'x'. + ~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. var f8 = (x: T, y: T) => { } class C { foo(x, x) { } + ~ +!!! error TS2300: Duplicate identifier 'x'. ~ !!! error TS2300: Duplicate identifier 'x'. foo2(x: number, x: string) { } - ~ + ~ +!!! error TS2300: Duplicate identifier 'x'. + ~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. foo3(x: T, x: T) { } - ~ + ~ +!!! error TS2300: Duplicate identifier 'x'. + ~~~~ !!! error TS2300: Duplicate identifier 'x'. } interface I { (x, x); + ~ +!!! error TS2300: Duplicate identifier 'x'. ~ !!! error TS2300: Duplicate identifier 'x'. (x: string, x: number); - ~ + ~ +!!! error TS2300: Duplicate identifier 'x'. + ~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. foo(x, x); + ~ +!!! error TS2300: Duplicate identifier 'x'. ~ !!! error TS2300: Duplicate identifier 'x'. foo(x: number, x: string); - ~ + ~ +!!! error TS2300: Duplicate identifier 'x'. + ~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. foo3(x: T, x: T); - ~ + ~ +!!! error TS2300: Duplicate identifier 'x'. + ~~~~ !!! error TS2300: Duplicate identifier 'x'. } var a: { foo(x, x); + ~ +!!! error TS2300: Duplicate identifier 'x'. ~ !!! error TS2300: Duplicate identifier 'x'. foo2(x: number, x: string); - ~ + ~ +!!! error TS2300: Duplicate identifier 'x'. + ~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. }; var b = { foo(x, x) { }, + ~ +!!! error TS2300: Duplicate identifier 'x'. ~ !!! error TS2300: Duplicate identifier 'x'. a: function foo(x: number, x: string) { }, - ~ + ~ +!!! error TS2300: Duplicate identifier 'x'. + ~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. b: (x: T, x: T) => { } - ~ + ~ +!!! error TS2300: Duplicate identifier 'x'. + ~~~~ !!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt b/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt index fcc1eee9169..76bf9aec947 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt @@ -1,10 +1,11 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts(20,15): error TS1005: '{' expected. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts(4,14): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts(11,9): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts(20,5): error TS2300: Duplicate identifier 'foo'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts(21,5): error TS2300: Duplicate identifier 'foo'. -==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts (4 errors) ==== +==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts (5 errors) ==== // Optional parameters allow initializers only in implementation signatures // All the below declarations are errors @@ -31,8 +32,10 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWit foo(x = 1), ~ !!! error TS1005: '{' expected. - foo(x = 1) { }, ~~~ +!!! error TS2300: Duplicate identifier 'foo'. + foo(x = 1) { }, + ~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'foo'. } diff --git a/tests/baselines/reference/class1.errors.txt b/tests/baselines/reference/class1.errors.txt index 91d29d981c2..13602645c45 100644 --- a/tests/baselines/reference/class1.errors.txt +++ b/tests/baselines/reference/class1.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/class1.ts(1,11): error TS2300: Duplicate identifier 'foo'. tests/cases/compiler/class1.ts(2,7): error TS2300: Duplicate identifier 'foo'. -==== tests/cases/compiler/class1.ts (1 errors) ==== +==== tests/cases/compiler/class1.ts (2 errors) ==== interface foo{ } + ~~~ +!!! error TS2300: Duplicate identifier 'foo'. class foo{ } ~~~ !!! error TS2300: Duplicate identifier 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/classAndInterface1.errors.txt b/tests/baselines/reference/classAndInterface1.errors.txt index d497fb4c44e..a7a1b028d82 100644 --- a/tests/baselines/reference/classAndInterface1.errors.txt +++ b/tests/baselines/reference/classAndInterface1.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/classAndInterface1.ts(1,7): error TS2300: Duplicate identifier 'cli'. tests/cases/compiler/classAndInterface1.ts(2,11): error TS2300: Duplicate identifier 'cli'. -==== tests/cases/compiler/classAndInterface1.ts (1 errors) ==== +==== tests/cases/compiler/classAndInterface1.ts (2 errors) ==== class cli { } + ~~~ +!!! error TS2300: Duplicate identifier 'cli'. interface cli { } // error ~~~ !!! error TS2300: Duplicate identifier 'cli'. \ No newline at end of file diff --git a/tests/baselines/reference/classAndInterfaceWithSameName.errors.txt b/tests/baselines/reference/classAndInterfaceWithSameName.errors.txt index a92f31ef469..aa3e687cf4d 100644 --- a/tests/baselines/reference/classAndInterfaceWithSameName.errors.txt +++ b/tests/baselines/reference/classAndInterfaceWithSameName.errors.txt @@ -1,15 +1,21 @@ +tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(1,7): error TS2300: Duplicate identifier 'C'. tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(2,11): error TS2300: Duplicate identifier 'C'. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(5,11): error TS2300: Duplicate identifier 'D'. tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(9,15): error TS2300: Duplicate identifier 'D'. -==== tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts (2 errors) ==== +==== tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts (4 errors) ==== class C { foo: string; } + ~ +!!! error TS2300: Duplicate identifier 'C'. interface C { foo: string; } // error ~ !!! error TS2300: Duplicate identifier 'C'. module M { class D { + ~ +!!! error TS2300: Duplicate identifier 'D'. bar: string; } diff --git a/tests/baselines/reference/classAndVariableWithSameName.errors.txt b/tests/baselines/reference/classAndVariableWithSameName.errors.txt index fb8b7e2dcde..909ea253926 100644 --- a/tests/baselines/reference/classAndVariableWithSameName.errors.txt +++ b/tests/baselines/reference/classAndVariableWithSameName.errors.txt @@ -1,15 +1,21 @@ +tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.ts(1,7): error TS2300: Duplicate identifier 'C'. tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.ts(2,5): error TS2300: Duplicate identifier 'C'. +tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.ts(5,11): error TS2300: Duplicate identifier 'D'. tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.ts(9,9): error TS2300: Duplicate identifier 'D'. -==== tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.ts (2 errors) ==== +==== tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.ts (4 errors) ==== class C { foo: string; } + ~ +!!! error TS2300: Duplicate identifier 'C'. var C = ''; // error ~ !!! error TS2300: Duplicate identifier 'C'. module M { class D { + ~ +!!! error TS2300: Duplicate identifier 'D'. bar: string; } diff --git a/tests/baselines/reference/classCannotExtendVar.errors.txt b/tests/baselines/reference/classCannotExtendVar.errors.txt index deed94615ce..5af07801bb4 100644 --- a/tests/baselines/reference/classCannotExtendVar.errors.txt +++ b/tests/baselines/reference/classCannotExtendVar.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/classCannotExtendVar.ts(1,5): error TS2300: Duplicate identifier 'Markup'. tests/cases/compiler/classCannotExtendVar.ts(3,7): error TS2300: Duplicate identifier 'Markup'. -==== tests/cases/compiler/classCannotExtendVar.ts (1 errors) ==== +==== tests/cases/compiler/classCannotExtendVar.ts (2 errors) ==== var Markup; + ~~~~~~ +!!! error TS2300: Duplicate identifier 'Markup'. class Markup { ~~~~~~ diff --git a/tests/baselines/reference/classOverloadForFunction.errors.txt b/tests/baselines/reference/classOverloadForFunction.errors.txt index 41f960dba66..c52da033a2c 100644 --- a/tests/baselines/reference/classOverloadForFunction.errors.txt +++ b/tests/baselines/reference/classOverloadForFunction.errors.txt @@ -1,9 +1,12 @@ -tests/cases/compiler/classOverloadForFunction.ts(2,10): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/classOverloadForFunction.ts(1,7): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/classOverloadForFunction.ts(2,1): error TS2300: Duplicate identifier 'foo'. -==== tests/cases/compiler/classOverloadForFunction.ts (1 errors) ==== +==== tests/cases/compiler/classOverloadForFunction.ts (2 errors) ==== class foo { }; + ~~~ +!!! error TS2300: Duplicate identifier 'foo'. function foo() {} - ~~~ + ~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/classOverloadForFunction2.errors.txt b/tests/baselines/reference/classOverloadForFunction2.errors.txt index df635f10129..4dd459c48ec 100644 --- a/tests/baselines/reference/classOverloadForFunction2.errors.txt +++ b/tests/baselines/reference/classOverloadForFunction2.errors.txt @@ -1,10 +1,13 @@ +tests/cases/compiler/classOverloadForFunction2.ts(1,10): error TS2300: Duplicate identifier 'bar'. tests/cases/compiler/classOverloadForFunction2.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. tests/cases/compiler/classOverloadForFunction2.ts(2,7): error TS2300: Duplicate identifier 'bar'. -==== tests/cases/compiler/classOverloadForFunction2.ts (2 errors) ==== +==== tests/cases/compiler/classOverloadForFunction2.ts (3 errors) ==== function bar(): string; ~~~ +!!! error TS2300: Duplicate identifier 'bar'. + ~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. class bar {} ~~~ diff --git a/tests/baselines/reference/classWithTwoConstructorDefinitions.errors.txt b/tests/baselines/reference/classWithTwoConstructorDefinitions.errors.txt index 6df51d85be3..fa093b91c2d 100644 --- a/tests/baselines/reference/classWithTwoConstructorDefinitions.errors.txt +++ b/tests/baselines/reference/classWithTwoConstructorDefinitions.errors.txt @@ -1,10 +1,14 @@ +tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts(2,5): error TS2392: Multiple constructor implementations are not allowed. tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts(3,5): error TS2392: Multiple constructor implementations are not allowed. +tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts(7,5): error TS2392: Multiple constructor implementations are not allowed. tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts(8,5): error TS2392: Multiple constructor implementations are not allowed. -==== tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts (2 errors) ==== +==== tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts (4 errors) ==== class C { constructor() { } + ~~~~~~~~~~~~~~~~~ +!!! error TS2392: Multiple constructor implementations are not allowed. constructor(x) { } // error ~~~~~~~~~~~~~~~~~~ !!! error TS2392: Multiple constructor implementations are not allowed. @@ -12,6 +16,8 @@ tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorD class D { constructor(x: T) { } + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2392: Multiple constructor implementations are not allowed. constructor(x: T, y: T) { } // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2392: Multiple constructor implementations are not allowed. diff --git a/tests/baselines/reference/clinterfaces.errors.txt b/tests/baselines/reference/clinterfaces.errors.txt index 62e8fc08725..d5eab2c7994 100644 --- a/tests/baselines/reference/clinterfaces.errors.txt +++ b/tests/baselines/reference/clinterfaces.errors.txt @@ -1,22 +1,32 @@ +tests/cases/compiler/clinterfaces.ts(2,11): error TS2300: Duplicate identifier 'C'. tests/cases/compiler/clinterfaces.ts(3,15): error TS2300: Duplicate identifier 'C'. +tests/cases/compiler/clinterfaces.ts(4,15): error TS2300: Duplicate identifier 'D'. tests/cases/compiler/clinterfaces.ts(5,11): error TS2300: Duplicate identifier 'D'. +tests/cases/compiler/clinterfaces.ts(8,11): error TS2300: Duplicate identifier 'Foo'. tests/cases/compiler/clinterfaces.ts(12,7): error TS2300: Duplicate identifier 'Foo'. +tests/cases/compiler/clinterfaces.ts(16,7): error TS2300: Duplicate identifier 'Bar'. tests/cases/compiler/clinterfaces.ts(20,11): error TS2300: Duplicate identifier 'Bar'. -==== tests/cases/compiler/clinterfaces.ts (4 errors) ==== +==== tests/cases/compiler/clinterfaces.ts (8 errors) ==== module M { class C { } + ~ +!!! error TS2300: Duplicate identifier 'C'. interface C { } ~ !!! error TS2300: Duplicate identifier 'C'. interface D { } + ~ +!!! error TS2300: Duplicate identifier 'D'. class D { } ~ !!! error TS2300: Duplicate identifier 'D'. } interface Foo { + ~~~ +!!! error TS2300: Duplicate identifier 'Foo'. a: string; } @@ -27,6 +37,8 @@ tests/cases/compiler/clinterfaces.ts(20,11): error TS2300: Duplicate identifier } class Bar{ + ~~~ +!!! error TS2300: Duplicate identifier 'Bar'. b: number; } diff --git a/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt b/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt index 7893afce829..901affa2554 100644 --- a/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt +++ b/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt @@ -1,11 +1,13 @@ tests/cases/compiler/cloduleWithDuplicateMember1.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/cloduleWithDuplicateMember1.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/cloduleWithDuplicateMember1.ts(3,16): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/cloduleWithDuplicateMember1.ts(6,12): error TS2300: Duplicate identifier 'foo'. tests/cases/compiler/cloduleWithDuplicateMember1.ts(10,16): error TS2300: Duplicate identifier 'x'. -tests/cases/compiler/cloduleWithDuplicateMember1.ts(13,21): error TS2300: Duplicate identifier 'foo'. -tests/cases/compiler/cloduleWithDuplicateMember1.ts(14,21): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/cloduleWithDuplicateMember1.ts(13,5): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/cloduleWithDuplicateMember1.ts(14,5): error TS2300: Duplicate identifier 'x'. -==== tests/cases/compiler/cloduleWithDuplicateMember1.ts (5 errors) ==== +==== tests/cases/compiler/cloduleWithDuplicateMember1.ts (7 errors) ==== class C { get x() { return 1; } ~ @@ -13,9 +15,13 @@ tests/cases/compiler/cloduleWithDuplicateMember1.ts(14,21): error TS2300: Duplic static get x() { ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + ~ +!!! error TS2300: Duplicate identifier 'x'. return ''; } static foo() { } + ~~~ +!!! error TS2300: Duplicate identifier 'foo'. } module C { @@ -25,9 +31,9 @@ tests/cases/compiler/cloduleWithDuplicateMember1.ts(14,21): error TS2300: Duplic } module C { export function foo() { } - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'foo'. export function x() { } - ~ + ~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt b/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt index 1118f23a98d..d8702a546d0 100644 --- a/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt +++ b/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt @@ -1,9 +1,10 @@ tests/cases/compiler/cloduleWithDuplicateMember2.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/cloduleWithDuplicateMember2.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/cloduleWithDuplicateMember2.ts(10,21): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/cloduleWithDuplicateMember2.ts(7,16): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/cloduleWithDuplicateMember2.ts(10,5): error TS2300: Duplicate identifier 'x'. -==== tests/cases/compiler/cloduleWithDuplicateMember2.ts (3 errors) ==== +==== tests/cases/compiler/cloduleWithDuplicateMember2.ts (4 errors) ==== class C { set x(y) { } ~ @@ -15,9 +16,11 @@ tests/cases/compiler/cloduleWithDuplicateMember2.ts(10,21): error TS2300: Duplic module C { export var x = 1; + ~ +!!! error TS2300: Duplicate identifier 'x'. } module C { export function x() { } - ~ + ~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/conflictingTypeAnnotatedVar.errors.txt b/tests/baselines/reference/conflictingTypeAnnotatedVar.errors.txt index f1e7d2abeed..080167cd760 100644 --- a/tests/baselines/reference/conflictingTypeAnnotatedVar.errors.txt +++ b/tests/baselines/reference/conflictingTypeAnnotatedVar.errors.txt @@ -1,18 +1,21 @@ -tests/cases/compiler/conflictingTypeAnnotatedVar.ts(2,10): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/conflictingTypeAnnotatedVar.ts(1,5): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/conflictingTypeAnnotatedVar.ts(2,1): error TS2300: Duplicate identifier 'foo'. tests/cases/compiler/conflictingTypeAnnotatedVar.ts(2,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. -tests/cases/compiler/conflictingTypeAnnotatedVar.ts(3,10): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/conflictingTypeAnnotatedVar.ts(3,1): error TS2300: Duplicate identifier 'foo'. tests/cases/compiler/conflictingTypeAnnotatedVar.ts(3,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. -==== tests/cases/compiler/conflictingTypeAnnotatedVar.ts (4 errors) ==== +==== tests/cases/compiler/conflictingTypeAnnotatedVar.ts (5 errors) ==== var foo: string; + ~~~ +!!! error TS2300: Duplicate identifier 'foo'. function foo(): number { } - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'foo'. ~~~~~~ !!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. function foo(): number { } - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'foo'. ~~~~~~ !!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. \ No newline at end of file diff --git a/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt b/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt index d17f52e90c1..e3d17237f1d 100644 --- a/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt +++ b/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(4,17): error TS2369: A parameter property is only allowed in a constructor implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(4,24): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(4,27): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(5,24): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(5,35): error TS2300: Duplicate identifier 'y'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(4,35): error TS2300: Duplicate identifier 'y'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(5,17): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(5,27): error TS2300: Duplicate identifier 'y'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(9,17): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(10,24): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(9,25): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(10,17): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(14,17): error TS2369: A parameter property is only allowed in a constructor implementation. tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(19,10): error TS2369: A parameter property is only allowed in a constructor implementation. tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(20,10): error TS2369: A parameter property is only allowed in a constructor implementation. @@ -15,19 +18,23 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatur tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(35,10): error TS2369: A parameter property is only allowed in a constructor implementation. -==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts (15 errors) ==== +==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts (18 errors) ==== // Parameter properties are not valid in overloads of constructors class C { constructor(public x, private y); ~~~~~~~~ !!! error TS2369: A parameter property is only allowed in a constructor implementation. - ~~~~~~~~~ -!!! error TS2369: A parameter property is only allowed in a constructor implementation. - constructor(public x, private y) { } ~ !!! error TS2300: Duplicate identifier 'x'. + ~~~~~~~~~ +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~ +!!! error TS2300: Duplicate identifier 'y'. + constructor(public x, private y) { } + ~~~~~~~~ +!!! error TS2300: Duplicate identifier 'x'. + ~~~~~~~~~ !!! error TS2300: Duplicate identifier 'y'. } @@ -35,8 +42,10 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatur constructor(private x); ~~~~~~~~~ !!! error TS2369: A parameter property is only allowed in a constructor implementation. + ~ +!!! error TS2300: Duplicate identifier 'x'. constructor(public x) { } - ~ + ~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. } diff --git a/tests/baselines/reference/constructorOverloads1.errors.txt b/tests/baselines/reference/constructorOverloads1.errors.txt index 4b57d5c7839..d72aac5bcd0 100644 --- a/tests/baselines/reference/constructorOverloads1.errors.txt +++ b/tests/baselines/reference/constructorOverloads1.errors.txt @@ -1,15 +1,26 @@ +tests/cases/compiler/constructorOverloads1.ts(2,5): error TS2392: Multiple constructor implementations are not allowed. +tests/cases/compiler/constructorOverloads1.ts(3,5): error TS2392: Multiple constructor implementations are not allowed. +tests/cases/compiler/constructorOverloads1.ts(4,5): error TS2392: Multiple constructor implementations are not allowed. tests/cases/compiler/constructorOverloads1.ts(7,5): error TS2392: Multiple constructor implementations are not allowed. tests/cases/compiler/constructorOverloads1.ts(16,18): error TS2345: Argument of type 'Foo' is not assignable to parameter of type 'number'. tests/cases/compiler/constructorOverloads1.ts(17,18): error TS2345: Argument of type 'unknown[]' is not assignable to parameter of type 'number'. -==== tests/cases/compiler/constructorOverloads1.ts (3 errors) ==== +==== tests/cases/compiler/constructorOverloads1.ts (6 errors) ==== class Foo { constructor(s: string); + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2392: Multiple constructor implementations are not allowed. constructor(n: number); + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2392: Multiple constructor implementations are not allowed. constructor(x: any) { + ~~~~~~~~~~~~~~~~~~~~~ + } + ~~~~~ +!!! error TS2392: Multiple constructor implementations are not allowed. constructor(x: any) { ~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/constructorOverloads4.errors.txt b/tests/baselines/reference/constructorOverloads4.errors.txt index 4b272b3f264..31c82ed5237 100644 --- a/tests/baselines/reference/constructorOverloads4.errors.txt +++ b/tests/baselines/reference/constructorOverloads4.errors.txt @@ -1,19 +1,22 @@ -tests/cases/compiler/constructorOverloads4.ts(5,21): error TS2300: Duplicate identifier 'Function'. -tests/cases/compiler/constructorOverloads4.ts(6,21): error TS2300: Duplicate identifier 'Function'. +tests/cases/compiler/constructorOverloads4.ts(2,18): error TS2300: Duplicate identifier 'Function'. +tests/cases/compiler/constructorOverloads4.ts(5,5): error TS2300: Duplicate identifier 'Function'. +tests/cases/compiler/constructorOverloads4.ts(6,5): error TS2300: Duplicate identifier 'Function'. tests/cases/compiler/constructorOverloads4.ts(10,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. tests/cases/compiler/constructorOverloads4.ts(11,1): error TS2348: Value of type 'typeof Function' is not callable. Did you mean to include 'new'? -==== tests/cases/compiler/constructorOverloads4.ts (4 errors) ==== +==== tests/cases/compiler/constructorOverloads4.ts (5 errors) ==== declare module M { export class Function { + ~~~~~~~~ +!!! error TS2300: Duplicate identifier 'Function'. constructor(...args: string[]); } export function Function(...args: any[]): any; - ~~~~~~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'Function'. export function Function(...args: string[]): Function; - ~~~~~~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'Function'. } diff --git a/tests/baselines/reference/constructorOverloads5.errors.txt b/tests/baselines/reference/constructorOverloads5.errors.txt index dd7ec956eac..0a695fc001c 100644 --- a/tests/baselines/reference/constructorOverloads5.errors.txt +++ b/tests/baselines/reference/constructorOverloads5.errors.txt @@ -1,12 +1,18 @@ +tests/cases/compiler/constructorOverloads5.ts(4,21): error TS2300: Duplicate identifier 'RegExp'. +tests/cases/compiler/constructorOverloads5.ts(5,21): error TS2300: Duplicate identifier 'RegExp'. tests/cases/compiler/constructorOverloads5.ts(6,18): error TS2300: Duplicate identifier 'RegExp'. -==== tests/cases/compiler/constructorOverloads5.ts (1 errors) ==== +==== tests/cases/compiler/constructorOverloads5.ts (3 errors) ==== interface IArguments {} declare module M { export function RegExp(pattern: string): RegExp; + ~~~~~~ +!!! error TS2300: Duplicate identifier 'RegExp'. export function RegExp(pattern: string, flags: string): RegExp; + ~~~~~~ +!!! error TS2300: Duplicate identifier 'RegExp'. export class RegExp { ~~~~~~ !!! error TS2300: Duplicate identifier 'RegExp'. diff --git a/tests/baselines/reference/constructorOverloads7.errors.txt b/tests/baselines/reference/constructorOverloads7.errors.txt index 4caa358e7bd..b7ad6d427b8 100644 --- a/tests/baselines/reference/constructorOverloads7.errors.txt +++ b/tests/baselines/reference/constructorOverloads7.errors.txt @@ -1,9 +1,12 @@ -tests/cases/compiler/constructorOverloads7.ts(15,10): error TS2300: Duplicate identifier 'Point'. +tests/cases/compiler/constructorOverloads7.ts(1,15): error TS2300: Duplicate identifier 'Point'. +tests/cases/compiler/constructorOverloads7.ts(15,1): error TS2300: Duplicate identifier 'Point'. tests/cases/compiler/constructorOverloads7.ts(22,18): error TS2384: Overload signatures must all be ambient or non-ambient. -==== tests/cases/compiler/constructorOverloads7.ts (2 errors) ==== +==== tests/cases/compiler/constructorOverloads7.ts (3 errors) ==== declare class Point + ~~~~~ +!!! error TS2300: Duplicate identifier 'Point'. { x: number; y: number; @@ -18,13 +21,18 @@ tests/cases/compiler/constructorOverloads7.ts(22,18): error TS2384: Overload sig // Because Point is a constructor function, this is inferred // to be Point and return type is inferred to be void function Point(x, y) { - ~~~~~ -!!! error TS2300: Duplicate identifier 'Point'. + ~~~~~~~~~~~~~~~~~~~~~~ this.x = x; + ~~~~~~~~~~~~~~~ this.y = y; + ~~~~~~~~~~~~~~~ + return this; + ~~~~~~~~~~~~~~~~ } + ~ +!!! error TS2300: Duplicate identifier 'Point'. declare function EF1(a:number, b:number):number; ~~~ diff --git a/tests/baselines/reference/constructorOverloads8.errors.txt b/tests/baselines/reference/constructorOverloads8.errors.txt index 3aa7e509898..ca79964ad3f 100644 --- a/tests/baselines/reference/constructorOverloads8.errors.txt +++ b/tests/baselines/reference/constructorOverloads8.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/constructorOverloads8.ts(2,5): error TS2392: Multiple constructor implementations are not allowed. tests/cases/compiler/constructorOverloads8.ts(3,5): error TS2392: Multiple constructor implementations are not allowed. -==== tests/cases/compiler/constructorOverloads8.ts (1 errors) ==== +==== tests/cases/compiler/constructorOverloads8.ts (2 errors) ==== class C { constructor(x) { } + ~~~~~~~~~~~~~~~~~~ +!!! error TS2392: Multiple constructor implementations are not allowed. constructor(y, x) { } // illegal, 2 constructor implementations ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2392: Multiple constructor implementations are not allowed. diff --git a/tests/baselines/reference/constructorParameterProperties2.errors.txt b/tests/baselines/reference/constructorParameterProperties2.errors.txt index df759fbe709..8a51ad82682 100644 --- a/tests/baselines/reference/constructorParameterProperties2.errors.txt +++ b/tests/baselines/reference/constructorParameterProperties2.errors.txt @@ -1,9 +1,12 @@ -tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(11,24): error TS2300: Duplicate identifier 'y'. -tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(19,25): error TS2300: Duplicate identifier 'y'. -tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(27,27): error TS2300: Duplicate identifier 'y'. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(10,5): error TS2300: Duplicate identifier 'y'. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(11,17): error TS2300: Duplicate identifier 'y'. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(18,5): error TS2300: Duplicate identifier 'y'. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(19,17): error TS2300: Duplicate identifier 'y'. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(26,5): error TS2300: Duplicate identifier 'y'. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(27,17): error TS2300: Duplicate identifier 'y'. -==== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts (3 errors) ==== +==== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts (6 errors) ==== class C { y: number; constructor(y: number) { } // ok @@ -14,8 +17,10 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co class D { y: number; + ~ +!!! error TS2300: Duplicate identifier 'y'. constructor(public y: number) { } // error - ~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'y'. } @@ -24,8 +29,10 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co class E { y: number; + ~ +!!! error TS2300: Duplicate identifier 'y'. constructor(private y: number) { } // error - ~ + ~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'y'. } @@ -34,8 +41,10 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co class F { y: number; + ~ +!!! error TS2300: Duplicate identifier 'y'. constructor(protected y: number) { } // error - ~ + ~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'y'. } diff --git a/tests/baselines/reference/contextualTyping.errors.txt b/tests/baselines/reference/contextualTyping.errors.txt index cea075477ee..630da5a903d 100644 --- a/tests/baselines/reference/contextualTyping.errors.txt +++ b/tests/baselines/reference/contextualTyping.errors.txt @@ -1,9 +1,10 @@ tests/cases/compiler/contextualTyping.ts(189,18): error TS2384: Overload signatures must all be ambient or non-ambient. -tests/cases/compiler/contextualTyping.ts(207,10): error TS2300: Duplicate identifier 'Point'. +tests/cases/compiler/contextualTyping.ts(197,15): error TS2300: Duplicate identifier 'Point'. +tests/cases/compiler/contextualTyping.ts(207,1): error TS2300: Duplicate identifier 'Point'. tests/cases/compiler/contextualTyping.ts(230,5): error TS2322: Type '{}' is not assignable to type 'B':\n Property 'x' is missing in type '{}'. -==== tests/cases/compiler/contextualTyping.ts (3 errors) ==== +==== tests/cases/compiler/contextualTyping.ts (4 errors) ==== // DEFAULT INTERFACES interface IFoo { n: number; @@ -203,6 +204,8 @@ tests/cases/compiler/contextualTyping.ts(230,5): error TS2322: Type '{}' is not // contextually typing from ambient class declarations declare class Point + ~~~~~ +!!! error TS2300: Duplicate identifier 'Point'. { constructor(x: number, y: number); x: number; @@ -213,13 +216,18 @@ tests/cases/compiler/contextualTyping.ts(230,5): error TS2322: Type '{}' is not } function Point(x, y) { - ~~~~~ -!!! error TS2300: Duplicate identifier 'Point'. + ~~~~~~~~~~~~~~~~~~~~~~ this.x = x; + ~~~~~~~~~~~~~~~ this.y = y; + ~~~~~~~~~~~~~~~ + return this; + ~~~~~~~~~~~~~~~~ } + ~ +!!! error TS2300: Duplicate identifier 'Point'. Point.origin = new Point(0, 0); diff --git a/tests/baselines/reference/declInput.errors.txt b/tests/baselines/reference/declInput.errors.txt index 2fbaf6db6bc..8ec341ce15b 100644 --- a/tests/baselines/reference/declInput.errors.txt +++ b/tests/baselines/reference/declInput.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/declInput.ts(1,11): error TS2300: Duplicate identifier 'bar'. tests/cases/compiler/declInput.ts(5,7): error TS2300: Duplicate identifier 'bar'. -==== tests/cases/compiler/declInput.ts (1 errors) ==== +==== tests/cases/compiler/declInput.ts (2 errors) ==== interface bar { + ~~~ +!!! error TS2300: Duplicate identifier 'bar'. } diff --git a/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt b/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt index a2e81b0eb95..dcbde21e670 100644 --- a/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt +++ b/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt @@ -4,11 +4,12 @@ tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompa tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompatibleWithBaseIndexer.ts(11,5): error TS2412: Property ''1'' of type '{ y: number; }' is not assignable to numeric index type '{ x: number; y: number; }'. tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompatibleWithBaseIndexer.ts(15,5): error TS2411: Property 'foo' of type '{ y: number; }' is not assignable to string index type '{ x: number; }'. tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompatibleWithBaseIndexer.ts(19,5): error TS2411: Property 'foo' of type '() => { x: number; }' is not assignable to string index type '{ x: number; }'. +tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompatibleWithBaseIndexer.ts(24,5): error TS2300: Duplicate identifier '1'. tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompatibleWithBaseIndexer.ts(24,5): error TS2412: Property '1' of type '{ x: number; }' is not assignable to numeric index type '{ x: number; y: number; }'. tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompatibleWithBaseIndexer.ts(28,5): error TS2300: Duplicate identifier ''1''. -==== tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompatibleWithBaseIndexer.ts (8 errors) ==== +==== tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompatibleWithBaseIndexer.ts (9 errors) ==== interface Base { [x: number]: { x: number; y: number; }; [x: string]: { x: number; } @@ -45,12 +46,14 @@ tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompa // satisifies string indexer but not numeric indexer interface Derived5 extends Base { 1: { x: number } // error + ~ +!!! error TS2300: Duplicate identifier '1'. ~~~~~~~~~~~~~~~~ !!! error TS2412: Property '1' of type '{ x: number; }' is not assignable to numeric index type '{ x: number; y: number; }'. } interface Derived5 extends Base { '1': { x: number } // error - ~~~ + ~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier ''1''. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateClassElements.errors.txt b/tests/baselines/reference/duplicateClassElements.errors.txt index 9ff44679e44..ee9fb937004 100644 --- a/tests/baselines/reference/duplicateClassElements.errors.txt +++ b/tests/baselines/reference/duplicateClassElements.errors.txt @@ -8,43 +8,61 @@ tests/cases/compiler/duplicateClassElements.ts(29,9): error TS1056: Accessors ar tests/cases/compiler/duplicateClassElements.ts(32,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/duplicateClassElements.ts(36,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/duplicateClassElements.ts(39,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/duplicateClassElements.ts(3,12): error TS2300: Duplicate identifier 'a'. +tests/cases/compiler/duplicateClassElements.ts(2,12): error TS2300: Duplicate identifier 'a'. +tests/cases/compiler/duplicateClassElements.ts(3,5): error TS2300: Duplicate identifier 'a'. +tests/cases/compiler/duplicateClassElements.ts(4,5): error TS2393: Duplicate function implementation. tests/cases/compiler/duplicateClassElements.ts(6,5): error TS2393: Duplicate function implementation. -tests/cases/compiler/duplicateClassElements.ts(9,9): error TS2300: Duplicate identifier 'x'. -tests/cases/compiler/duplicateClassElements.ts(12,9): error TS2300: Duplicate identifier 'x'. -tests/cases/compiler/duplicateClassElements.ts(23,9): error TS2300: Duplicate identifier 'z'. -tests/cases/compiler/duplicateClassElements.ts(26,9): error TS2300: Duplicate identifier 'z'. -tests/cases/compiler/duplicateClassElements.ts(34,12): error TS2300: Duplicate identifier 'x2'. -tests/cases/compiler/duplicateClassElements.ts(41,12): error TS2300: Duplicate identifier 'z2'. +tests/cases/compiler/duplicateClassElements.ts(8,12): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/duplicateClassElements.ts(9,5): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/duplicateClassElements.ts(12,5): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/duplicateClassElements.ts(21,12): error TS2300: Duplicate identifier 'z'. +tests/cases/compiler/duplicateClassElements.ts(23,5): error TS2300: Duplicate identifier 'z'. +tests/cases/compiler/duplicateClassElements.ts(26,5): error TS2300: Duplicate identifier 'z'. +tests/cases/compiler/duplicateClassElements.ts(29,9): error TS2300: Duplicate identifier 'x2'. +tests/cases/compiler/duplicateClassElements.ts(32,9): error TS2300: Duplicate identifier 'x2'. +tests/cases/compiler/duplicateClassElements.ts(34,5): error TS2300: Duplicate identifier 'x2'. +tests/cases/compiler/duplicateClassElements.ts(36,9): error TS2300: Duplicate identifier 'z2'. +tests/cases/compiler/duplicateClassElements.ts(39,9): error TS2300: Duplicate identifier 'z2'. +tests/cases/compiler/duplicateClassElements.ts(41,5): error TS2300: Duplicate identifier 'z2'. -==== tests/cases/compiler/duplicateClassElements.ts (18 errors) ==== +==== tests/cases/compiler/duplicateClassElements.ts (26 errors) ==== class a { - public a; public a; ~ +!!! error TS2300: Duplicate identifier 'a'. + public a; + ~~~~~~~~~ !!! error TS2300: Duplicate identifier 'a'. public b() { + ~~~~~~~~~~~~ } + ~~~~~ +!!! error TS2393: Duplicate function implementation. public b() { ~~~~~~~~~~~~ } ~~~~~ !!! error TS2393: Duplicate function implementation. public x; + ~ +!!! error TS2300: Duplicate identifier 'x'. get x() { ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ -!!! error TS2300: Duplicate identifier 'x'. + ~~~~~~~~~ return 10; + ~~~~~~~~~~~~~~~~~~ } + ~~~~~ +!!! error TS2300: Duplicate identifier 'x'. set x(_x: number) { ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ -!!! error TS2300: Duplicate identifier 'x'. + ~~~~~~~~~~~~~~~~~~~ } + ~~~~~ +!!! error TS2300: Duplicate identifier 'x'. get y() { ~ @@ -57,46 +75,60 @@ tests/cases/compiler/duplicateClassElements.ts(41,12): error TS2300: Duplicate i } public z() { + ~ +!!! error TS2300: Duplicate identifier 'z'. } get z() { ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ -!!! error TS2300: Duplicate identifier 'z'. + ~~~~~~~~~ return "Hello"; + ~~~~~~~~~~~~~~~~~~~~~~~ } + ~~~~~ +!!! error TS2300: Duplicate identifier 'z'. set z(_y: string) { ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ -!!! error TS2300: Duplicate identifier 'z'. + ~~~~~~~~~~~~~~~~~~~ } + ~~~~~ +!!! error TS2300: Duplicate identifier 'z'. get x2() { ~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + ~~ +!!! error TS2300: Duplicate identifier 'x2'. return 10; } set x2(_x: number) { ~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + ~~ +!!! error TS2300: Duplicate identifier 'x2'. } public x2; - ~~ + ~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x2'. get z2() { ~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + ~~ +!!! error TS2300: Duplicate identifier 'z2'. return "Hello"; } set z2(_y: string) { ~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - public z2() { - ~~ + ~~ !!! error TS2300: Duplicate identifier 'z2'. } + public z2() { + ~~~~~~~~~~~~~ + } + ~~~~~ +!!! error TS2300: Duplicate identifier 'z2'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateIdentifierInCatchBlock.errors.txt b/tests/baselines/reference/duplicateIdentifierInCatchBlock.errors.txt index 08eb464c8ad..7c43bc81289 100644 --- a/tests/baselines/reference/duplicateIdentifierInCatchBlock.errors.txt +++ b/tests/baselines/reference/duplicateIdentifierInCatchBlock.errors.txt @@ -1,18 +1,25 @@ -tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(3,14): error TS2300: Duplicate identifier 'v'. +tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(1,5): error TS2300: Duplicate identifier 'v'. +tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(3,5): error TS2300: Duplicate identifier 'v'. +tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(6,10): error TS2300: Duplicate identifier 'w'. tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(8,9): error TS2300: Duplicate identifier 'w'. -tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(13,14): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(12,9): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(13,5): error TS2300: Duplicate identifier 'x'. tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(16,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'string', but here has type 'number'. -==== tests/cases/compiler/duplicateIdentifierInCatchBlock.ts (4 errors) ==== +==== tests/cases/compiler/duplicateIdentifierInCatchBlock.ts (7 errors) ==== var v; + ~ +!!! error TS2300: Duplicate identifier 'v'. try { } catch (e) { function v() { } - ~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'v'. } function w() { } + ~ +!!! error TS2300: Duplicate identifier 'w'. try { } catch (e) { var w; ~ @@ -21,8 +28,10 @@ tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(16,9): error TS2403: Sub try { } catch (e) { var x; + ~ +!!! error TS2300: Duplicate identifier 'x'. function x() { } // error - ~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. function e() { } // error var p: string; diff --git a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.errors.txt b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.errors.txt index 783504277e0..6c80d13b2f4 100644 --- a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.errors.txt +++ b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.errors.txt @@ -1,11 +1,16 @@ +tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(2,22): error TS2300: Duplicate identifier 'I'. tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(5,18): error TS2300: Duplicate identifier 'I'. +tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(9,21): error TS2300: Duplicate identifier 'f'. tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(12,18): error TS2300: Duplicate identifier 'f'. +tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(37,12): error TS2300: Duplicate identifier 'x'. tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(41,16): error TS2300: Duplicate identifier 'x'. -==== tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts (3 errors) ==== +==== tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts (6 errors) ==== module M { export interface I { } + ~ +!!! error TS2300: Duplicate identifier 'I'. } module M { export class I { } // error @@ -15,6 +20,8 @@ tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(41,16): er module M { export function f() { } + ~ +!!! error TS2300: Duplicate identifier 'f'. } module M { export class f { } // error @@ -45,6 +52,8 @@ tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(41,16): er class Foo { static x: number; + ~ +!!! error TS2300: Duplicate identifier 'x'. } module Foo { diff --git a/tests/baselines/reference/duplicateInterfaceMembers1.errors.txt b/tests/baselines/reference/duplicateInterfaceMembers1.errors.txt index 952b9b3bc42..5920064dd99 100644 --- a/tests/baselines/reference/duplicateInterfaceMembers1.errors.txt +++ b/tests/baselines/reference/duplicateInterfaceMembers1.errors.txt @@ -1,11 +1,14 @@ +tests/cases/compiler/duplicateInterfaceMembers1.ts(2,4): error TS2300: Duplicate identifier 'x'. tests/cases/compiler/duplicateInterfaceMembers1.ts(3,4): error TS2300: Duplicate identifier 'x'. -==== tests/cases/compiler/duplicateInterfaceMembers1.ts (1 errors) ==== +==== tests/cases/compiler/duplicateInterfaceMembers1.ts (2 errors) ==== interface Bar { - x: number; x: number; ~ +!!! error TS2300: Duplicate identifier 'x'. + x: number; + ~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateObjectLiteralProperty.errors.txt b/tests/baselines/reference/duplicateObjectLiteralProperty.errors.txt index 370a7070505..6ea3a636ab8 100644 --- a/tests/baselines/reference/duplicateObjectLiteralProperty.errors.txt +++ b/tests/baselines/reference/duplicateObjectLiteralProperty.errors.txt @@ -2,31 +2,42 @@ tests/cases/compiler/duplicateObjectLiteralProperty.ts(14,9): error TS1056: Acce tests/cases/compiler/duplicateObjectLiteralProperty.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/duplicateObjectLiteralProperty.ts(16,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/duplicateObjectLiteralProperty.ts(16,9): error TS1118: An object literal cannot have multiple get/set accessors with the same name. +tests/cases/compiler/duplicateObjectLiteralProperty.ts(2,5): error TS2300: Duplicate identifier 'a'. tests/cases/compiler/duplicateObjectLiteralProperty.ts(4,5): error TS2300: Duplicate identifier 'a'. tests/cases/compiler/duplicateObjectLiteralProperty.ts(5,5): error TS2300: Duplicate identifier '\u0061'. tests/cases/compiler/duplicateObjectLiteralProperty.ts(6,5): error TS2300: Duplicate identifier 'a'. +tests/cases/compiler/duplicateObjectLiteralProperty.ts(7,9): error TS2300: Duplicate identifier 'c'. tests/cases/compiler/duplicateObjectLiteralProperty.ts(8,9): error TS2300: Duplicate identifier '"c"'. -tests/cases/compiler/duplicateObjectLiteralProperty.ts(16,9): error TS2300: Duplicate identifier 'a'. +tests/cases/compiler/duplicateObjectLiteralProperty.ts(14,9): error TS2300: Duplicate identifier 'a'. +tests/cases/compiler/duplicateObjectLiteralProperty.ts(15,9): error TS2300: Duplicate identifier 'a'. +tests/cases/compiler/duplicateObjectLiteralProperty.ts(16,5): error TS2300: Duplicate identifier 'a'. -==== tests/cases/compiler/duplicateObjectLiteralProperty.ts (9 errors) ==== +==== tests/cases/compiler/duplicateObjectLiteralProperty.ts (13 errors) ==== var x = { a: 1, + ~ +!!! error TS2300: Duplicate identifier 'a'. b: true, // OK a: 56, // Duplicate - ~ + ~~~~~ !!! error TS2300: Duplicate identifier 'a'. \u0061: "ss", // Duplicate - ~~~~~~ + ~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '\u0061'. a: { - ~ -!!! error TS2300: Duplicate identifier 'a'. + ~~~~ c: 1, + ~~~~~~~~~~~~~ + ~ +!!! error TS2300: Duplicate identifier 'c'. "c": 56, // Duplicate - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~ !!! error TS2300: Duplicate identifier '"c"'. } + ~~~~~ +!!! error TS2300: Duplicate identifier 'a'. }; @@ -34,15 +45,19 @@ tests/cases/compiler/duplicateObjectLiteralProperty.ts(16,9): error TS2300: Dupl get a() { return 0; }, ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + ~ +!!! error TS2300: Duplicate identifier 'a'. set a(v: number) { }, ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + ~ +!!! error TS2300: Duplicate identifier 'a'. get a() { return 0; } ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ !!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. - ~ + ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'a'. }; \ No newline at end of file diff --git a/tests/baselines/reference/duplicatePropertiesInStrictMode.errors.txt b/tests/baselines/reference/duplicatePropertiesInStrictMode.errors.txt index 17a55a7876b..50b29eff93a 100644 --- a/tests/baselines/reference/duplicatePropertiesInStrictMode.errors.txt +++ b/tests/baselines/reference/duplicatePropertiesInStrictMode.errors.txt @@ -1,14 +1,17 @@ tests/cases/compiler/duplicatePropertiesInStrictMode.ts(4,3): error TS1117: An object literal cannot have multiple properties with the same name in strict mode. +tests/cases/compiler/duplicatePropertiesInStrictMode.ts(3,3): error TS2300: Duplicate identifier 'x'. tests/cases/compiler/duplicatePropertiesInStrictMode.ts(4,3): error TS2300: Duplicate identifier 'x'. -==== tests/cases/compiler/duplicatePropertiesInStrictMode.ts (2 errors) ==== +==== tests/cases/compiler/duplicatePropertiesInStrictMode.ts (3 errors) ==== "use strict"; var x = { x: 1, + ~ +!!! error TS2300: Duplicate identifier 'x'. x: 2 ~ !!! error TS1117: An object literal cannot have multiple properties with the same name in strict mode. - ~ + ~~~~ !!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicatePropertyNames.errors.txt b/tests/baselines/reference/duplicatePropertyNames.errors.txt index ac21db7830a..6ed93382aef 100644 --- a/tests/baselines/reference/duplicatePropertyNames.errors.txt +++ b/tests/baselines/reference/duplicatePropertyNames.errors.txt @@ -1,22 +1,34 @@ +tests/cases/conformance/types/members/duplicatePropertyNames.ts(4,5): error TS2300: Duplicate identifier 'foo'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(5,5): error TS2300: Duplicate identifier 'foo'. +tests/cases/conformance/types/members/duplicatePropertyNames.ts(14,5): error TS2300: Duplicate identifier 'foo'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(15,5): error TS2300: Duplicate identifier 'foo'. +tests/cases/conformance/types/members/duplicatePropertyNames.ts(19,5): error TS2300: Duplicate identifier 'foo'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(20,5): error TS2300: Duplicate identifier 'foo'. +tests/cases/conformance/types/members/duplicatePropertyNames.ts(22,5): error TS2393: Duplicate function implementation. tests/cases/conformance/types/members/duplicatePropertyNames.ts(23,5): error TS2393: Duplicate function implementation. +tests/cases/conformance/types/members/duplicatePropertyNames.ts(25,5): error TS2300: Duplicate identifier 'baz'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(26,5): error TS2300: Duplicate identifier 'baz'. +tests/cases/conformance/types/members/duplicatePropertyNames.ts(30,5): error TS2300: Duplicate identifier 'foo'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(31,5): error TS2300: Duplicate identifier 'foo'. +tests/cases/conformance/types/members/duplicatePropertyNames.ts(35,5): error TS2300: Duplicate identifier 'foo'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(36,5): error TS2300: Duplicate identifier 'foo'. +tests/cases/conformance/types/members/duplicatePropertyNames.ts(38,5): error TS2300: Duplicate identifier 'bar'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(39,5): error TS2300: Duplicate identifier 'bar'. +tests/cases/conformance/types/members/duplicatePropertyNames.ts(43,5): error TS2300: Duplicate identifier 'foo'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(44,5): error TS2300: Duplicate identifier 'foo'. +tests/cases/conformance/types/members/duplicatePropertyNames.ts(45,5): error TS2300: Duplicate identifier 'bar'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(46,5): error TS2300: Duplicate identifier 'bar'. -==== tests/cases/conformance/types/members/duplicatePropertyNames.ts (10 errors) ==== +==== tests/cases/conformance/types/members/duplicatePropertyNames.ts (20 errors) ==== // duplicate property names are an error in all types interface Number { - foo: string; foo: string; ~~~ +!!! error TS2300: Duplicate identifier 'foo'. + foo: string; + ~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'foo'. } @@ -26,56 +38,74 @@ tests/cases/conformance/types/members/duplicatePropertyNames.ts(46,5): error TS2 } interface Array { - foo: T; foo: T; ~~~ +!!! error TS2300: Duplicate identifier 'foo'. + foo: T; + ~~~~~~~ !!! error TS2300: Duplicate identifier 'foo'. } class C { - foo: string; foo: string; ~~~ !!! error TS2300: Duplicate identifier 'foo'. + foo: string; + ~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'foo'. bar(x) { } + ~~~~~~~~~~ +!!! error TS2393: Duplicate function implementation. bar(x) { } ~~~~~~~~~~ !!! error TS2393: Duplicate function implementation. - baz = () => { } baz = () => { } ~~~ +!!! error TS2300: Duplicate identifier 'baz'. + baz = () => { } + ~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'baz'. } interface I { - foo: string; foo: string; ~~~ +!!! error TS2300: Duplicate identifier 'foo'. + foo: string; + ~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'foo'. } var a: { - foo: string; foo: string; ~~~ !!! error TS2300: Duplicate identifier 'foo'. + foo: string; + ~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'foo'. - bar: () => {}; bar: () => {}; ~~~ +!!! error TS2300: Duplicate identifier 'bar'. + bar: () => {}; + ~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'bar'. } var b = { - foo: '', foo: '', ~~~ +!!! error TS2300: Duplicate identifier 'foo'. + foo: '', + ~~~~~~~ !!! error TS2300: Duplicate identifier 'foo'. bar: () => { }, - bar: () => { } ~~~ +!!! error TS2300: Duplicate identifier 'bar'. + bar: () => { } + ~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'bar'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateStringNamedProperty1.errors.txt b/tests/baselines/reference/duplicateStringNamedProperty1.errors.txt index 9353eb34151..38652e37f10 100644 --- a/tests/baselines/reference/duplicateStringNamedProperty1.errors.txt +++ b/tests/baselines/reference/duplicateStringNamedProperty1.errors.txt @@ -1,10 +1,13 @@ +tests/cases/compiler/duplicateStringNamedProperty1.ts(2,5): error TS2300: Duplicate identifier '"artist"'. tests/cases/compiler/duplicateStringNamedProperty1.ts(3,5): error TS2300: Duplicate identifier 'artist'. -==== tests/cases/compiler/duplicateStringNamedProperty1.ts (1 errors) ==== +==== tests/cases/compiler/duplicateStringNamedProperty1.ts (2 errors) ==== export interface Album { "artist": string; + ~~~~~~~~ +!!! error TS2300: Duplicate identifier '"artist"'. artist: string; - ~~~~~~ + ~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'artist'. } \ No newline at end of file diff --git a/tests/baselines/reference/enumGenericTypeClash.errors.txt b/tests/baselines/reference/enumGenericTypeClash.errors.txt index adf345870de..23007175e4c 100644 --- a/tests/baselines/reference/enumGenericTypeClash.errors.txt +++ b/tests/baselines/reference/enumGenericTypeClash.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/enumGenericTypeClash.ts(1,7): error TS2300: Duplicate identifier 'X'. tests/cases/compiler/enumGenericTypeClash.ts(2,6): error TS2300: Duplicate identifier 'X'. -==== tests/cases/compiler/enumGenericTypeClash.ts (1 errors) ==== +==== tests/cases/compiler/enumGenericTypeClash.ts (2 errors) ==== class X { } + ~ +!!! error TS2300: Duplicate identifier 'X'. enum X { MyVal } ~ !!! error TS2300: Duplicate identifier 'X'. diff --git a/tests/baselines/reference/enumIdenticalIdentifierValues.errors.txt b/tests/baselines/reference/enumIdenticalIdentifierValues.errors.txt index 26b5da7d0cf..551b5d9d929 100644 --- a/tests/baselines/reference/enumIdenticalIdentifierValues.errors.txt +++ b/tests/baselines/reference/enumIdenticalIdentifierValues.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/enumIdenticalIdentifierValues.ts(2,5): error TS2300: Duplicate identifier '1'. tests/cases/compiler/enumIdenticalIdentifierValues.ts(3,5): error TS2300: Duplicate identifier '1.0'. -==== tests/cases/compiler/enumIdenticalIdentifierValues.ts (1 errors) ==== +==== tests/cases/compiler/enumIdenticalIdentifierValues.ts (2 errors) ==== enum Enum { 1, + ~ +!!! error TS2300: Duplicate identifier '1'. 1.0 ~~~ !!! error TS2300: Duplicate identifier '1.0'. diff --git a/tests/baselines/reference/es6ClassTest9.errors.txt b/tests/baselines/reference/es6ClassTest9.errors.txt index 3cd59059f89..d8af974a176 100644 --- a/tests/baselines/reference/es6ClassTest9.errors.txt +++ b/tests/baselines/reference/es6ClassTest9.errors.txt @@ -1,15 +1,18 @@ tests/cases/compiler/es6ClassTest9.ts(1,18): error TS1005: '{' expected. tests/cases/compiler/es6ClassTest9.ts(1,19): error TS1109: Expression expected. -tests/cases/compiler/es6ClassTest9.ts(2,10): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/es6ClassTest9.ts(1,15): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/es6ClassTest9.ts(2,1): error TS2300: Duplicate identifier 'foo'. -==== tests/cases/compiler/es6ClassTest9.ts (3 errors) ==== +==== tests/cases/compiler/es6ClassTest9.ts (4 errors) ==== declare class foo(); ~ !!! error TS1005: '{' expected. ~ !!! error TS1109: Expression expected. + ~~~ +!!! error TS2300: Duplicate identifier 'foo'. function foo() {} - ~~~ + ~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/exportSameNameFuncVar.errors.txt b/tests/baselines/reference/exportSameNameFuncVar.errors.txt index 0103d0e8968..4d6d835b13b 100644 --- a/tests/baselines/reference/exportSameNameFuncVar.errors.txt +++ b/tests/baselines/reference/exportSameNameFuncVar.errors.txt @@ -1,9 +1,13 @@ -tests/cases/compiler/exportSameNameFuncVar.ts(2,17): error TS2300: Duplicate identifier 'a'. +tests/cases/compiler/exportSameNameFuncVar.ts(1,12): error TS2300: Duplicate identifier 'a'. +tests/cases/compiler/exportSameNameFuncVar.ts(2,1): error TS2300: Duplicate identifier 'a'. -==== tests/cases/compiler/exportSameNameFuncVar.ts (1 errors) ==== +==== tests/cases/compiler/exportSameNameFuncVar.ts (2 errors) ==== export var a = 10; - export function a() { - ~ + ~ !!! error TS2300: Duplicate identifier 'a'. - } \ No newline at end of file + export function a() { + ~~~~~~~~~~~~~~~~~~~~~ + } + ~ +!!! error TS2300: Duplicate identifier 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/extension.errors.txt b/tests/baselines/reference/extension.errors.txt index 9756d2920d1..e55f15f4381 100644 --- a/tests/baselines/reference/extension.errors.txt +++ b/tests/baselines/reference/extension.errors.txt @@ -1,11 +1,12 @@ tests/cases/compiler/extension.ts(16,5): error TS1128: Declaration or statement expected. tests/cases/compiler/extension.ts(16,22): error TS1005: ';' expected. +tests/cases/compiler/extension.ts(10,18): error TS2300: Duplicate identifier 'C'. tests/cases/compiler/extension.ts(16,12): error TS2304: Cannot find name 'extension'. tests/cases/compiler/extension.ts(16,28): error TS2300: Duplicate identifier 'C'. tests/cases/compiler/extension.ts(22,3): error TS2339: Property 'pe' does not exist on type 'C'. -==== tests/cases/compiler/extension.ts (5 errors) ==== +==== tests/cases/compiler/extension.ts (6 errors) ==== interface I { x; } @@ -16,6 +17,8 @@ tests/cases/compiler/extension.ts(22,3): error TS2339: Property 'pe' does not ex declare module M { export class C { + ~ +!!! error TS2300: Duplicate identifier 'C'. public p:number; } } diff --git a/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt b/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt index ef205adfd42..34b6ea08e09 100644 --- a/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt +++ b/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt @@ -1,13 +1,16 @@ tests/cases/compiler/fieldAndGetterWithSameName.ts(3,7): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/fieldAndGetterWithSameName.ts(3,7): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/fieldAndGetterWithSameName.ts(2,5): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/fieldAndGetterWithSameName.ts(3,3): error TS2300: Duplicate identifier 'x'. -==== tests/cases/compiler/fieldAndGetterWithSameName.ts (2 errors) ==== +==== tests/cases/compiler/fieldAndGetterWithSameName.ts (3 errors) ==== export class C { x: number; + ~ +!!! error TS2300: Duplicate identifier 'x'. get x(): number { return 1; } ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/funClodule.errors.txt b/tests/baselines/reference/funClodule.errors.txt index 20598f276f3..9a4f6c27224 100644 --- a/tests/baselines/reference/funClodule.errors.txt +++ b/tests/baselines/reference/funClodule.errors.txt @@ -1,11 +1,21 @@ +tests/cases/compiler/funClodule.ts(1,18): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/funClodule.ts(2,16): error TS2300: Duplicate identifier 'foo'. tests/cases/compiler/funClodule.ts(5,15): error TS2300: Duplicate identifier 'foo'. -tests/cases/compiler/funClodule.ts(12,18): error TS2300: Duplicate identifier 'foo2'. +tests/cases/compiler/funClodule.ts(8,15): error TS2300: Duplicate identifier 'foo2'. +tests/cases/compiler/funClodule.ts(9,16): error TS2300: Duplicate identifier 'foo2'. +tests/cases/compiler/funClodule.ts(12,1): error TS2300: Duplicate identifier 'foo2'. +tests/cases/compiler/funClodule.ts(15,10): error TS2300: Duplicate identifier 'foo3'. +tests/cases/compiler/funClodule.ts(16,8): error TS2300: Duplicate identifier 'foo3'. tests/cases/compiler/funClodule.ts(19,7): error TS2300: Duplicate identifier 'foo3'. -==== tests/cases/compiler/funClodule.ts (3 errors) ==== +==== tests/cases/compiler/funClodule.ts (9 errors) ==== declare function foo(); + ~~~ +!!! error TS2300: Duplicate identifier 'foo'. declare module foo { + ~~~ +!!! error TS2300: Duplicate identifier 'foo'. export function x(): any; } declare class foo { } // Should error @@ -14,16 +24,24 @@ tests/cases/compiler/funClodule.ts(19,7): error TS2300: Duplicate identifier 'fo declare class foo2 { } + ~~~~ +!!! error TS2300: Duplicate identifier 'foo2'. declare module foo2 { + ~~~~ +!!! error TS2300: Duplicate identifier 'foo2'. export function x(): any; } declare function foo2(); // Should error - ~~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'foo2'. function foo3() { } + ~~~~ +!!! error TS2300: Duplicate identifier 'foo3'. module foo3 { + ~~~~ +!!! error TS2300: Duplicate identifier 'foo3'. export function x(): any { } } class foo3 { } // Should error diff --git a/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt b/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt index 8b1efe089c1..1e246184fb1 100644 --- a/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt +++ b/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt @@ -1,15 +1,20 @@ tests/cases/compiler/functionAndPropertyNameConflict.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/functionAndPropertyNameConflict.ts(3,16): error TS2300: Duplicate identifier 'aaaaa'. +tests/cases/compiler/functionAndPropertyNameConflict.ts(2,12): error TS2300: Duplicate identifier 'aaaaa'. +tests/cases/compiler/functionAndPropertyNameConflict.ts(3,5): error TS2300: Duplicate identifier 'aaaaa'. -==== tests/cases/compiler/functionAndPropertyNameConflict.ts (2 errors) ==== +==== tests/cases/compiler/functionAndPropertyNameConflict.ts (3 errors) ==== class C65 { public aaaaa() { } + ~~~~~ +!!! error TS2300: Duplicate identifier 'aaaaa'. public get aaaaa() { ~~~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~ -!!! error TS2300: Duplicate identifier 'aaaaa'. + ~~~~~~~~~~~~~~~~~~~~ return 1; + ~~~~~~~~~~~~~~~~~ } + ~~~~~ +!!! error TS2300: Duplicate identifier 'aaaaa'. } \ No newline at end of file diff --git a/tests/baselines/reference/functionCall15.errors.txt b/tests/baselines/reference/functionCall15.errors.txt index 09c246d34dc..3d170c34fa0 100644 --- a/tests/baselines/reference/functionCall15.errors.txt +++ b/tests/baselines/reference/functionCall15.errors.txt @@ -1,7 +1,10 @@ -tests/cases/compiler/functionCall15.ts(1,39): error TS2300: Duplicate identifier 'b'. +tests/cases/compiler/functionCall15.ts(1,25): error TS2300: Duplicate identifier 'b'. +tests/cases/compiler/functionCall15.ts(1,36): error TS2300: Duplicate identifier 'b'. -==== tests/cases/compiler/functionCall15.ts (1 errors) ==== +==== tests/cases/compiler/functionCall15.ts (2 errors) ==== function foo(a?:string, b?:number, ...b:number[]){} - ~ + ~ +!!! error TS2300: Duplicate identifier 'b'. + ~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'b'. \ No newline at end of file diff --git a/tests/baselines/reference/functionNameConflicts.errors.txt b/tests/baselines/reference/functionNameConflicts.errors.txt index 08a2c5c462d..cf37103eed5 100644 --- a/tests/baselines/reference/functionNameConflicts.errors.txt +++ b/tests/baselines/reference/functionNameConflicts.errors.txt @@ -1,39 +1,54 @@ +tests/cases/conformance/functions/functionNameConflicts.ts(5,14): error TS2300: Duplicate identifier 'fn1'. tests/cases/conformance/functions/functionNameConflicts.ts(6,9): error TS2300: Duplicate identifier 'fn1'. -tests/cases/conformance/functions/functionNameConflicts.ts(9,14): error TS2300: Duplicate identifier 'fn2'. +tests/cases/conformance/functions/functionNameConflicts.ts(8,9): error TS2300: Duplicate identifier 'fn2'. +tests/cases/conformance/functions/functionNameConflicts.ts(9,5): error TS2300: Duplicate identifier 'fn2'. +tests/cases/conformance/functions/functionNameConflicts.ts(12,10): error TS2300: Duplicate identifier 'fn3'. tests/cases/conformance/functions/functionNameConflicts.ts(13,5): error TS2300: Duplicate identifier 'fn3'. -tests/cases/conformance/functions/functionNameConflicts.ts(17,14): error TS2300: Duplicate identifier 'fn4'. +tests/cases/conformance/functions/functionNameConflicts.ts(16,9): error TS2300: Duplicate identifier 'fn4'. +tests/cases/conformance/functions/functionNameConflicts.ts(17,5): error TS2300: Duplicate identifier 'fn4'. +tests/cases/conformance/functions/functionNameConflicts.ts(19,14): error TS2300: Duplicate identifier 'fn5'. tests/cases/conformance/functions/functionNameConflicts.ts(20,9): error TS2300: Duplicate identifier 'fn5'. tests/cases/conformance/functions/functionNameConflicts.ts(24,10): error TS2389: Function implementation name must be 'over'. -==== tests/cases/conformance/functions/functionNameConflicts.ts (6 errors) ==== +==== tests/cases/conformance/functions/functionNameConflicts.ts (11 errors) ==== //Function and variable of the same name in same declaration space //Function overload with different name from implementation signature module M { function fn1() { } + ~~~ +!!! error TS2300: Duplicate identifier 'fn1'. var fn1; ~~~ !!! error TS2300: Duplicate identifier 'fn1'. var fn2; + ~~~ +!!! error TS2300: Duplicate identifier 'fn2'. function fn2() { } - ~~~ + ~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'fn2'. } function fn3() { } + ~~~ +!!! error TS2300: Duplicate identifier 'fn3'. var fn3; ~~~ !!! error TS2300: Duplicate identifier 'fn3'. function func() { var fn4; + ~~~ +!!! error TS2300: Duplicate identifier 'fn4'. function fn4() { } - ~~~ + ~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'fn4'. function fn5() { } + ~~~ +!!! error TS2300: Duplicate identifier 'fn5'. var fn5; ~~~ !!! error TS2300: Duplicate identifier 'fn5'. diff --git a/tests/baselines/reference/functionWithSameNameAsField.errors.txt b/tests/baselines/reference/functionWithSameNameAsField.errors.txt index e1ba390cf94..4dd114c8872 100644 --- a/tests/baselines/reference/functionWithSameNameAsField.errors.txt +++ b/tests/baselines/reference/functionWithSameNameAsField.errors.txt @@ -1,14 +1,20 @@ -tests/cases/compiler/functionWithSameNameAsField.ts(3,12): error TS2300: Duplicate identifier 'total'. +tests/cases/compiler/functionWithSameNameAsField.ts(2,12): error TS2300: Duplicate identifier 'total'. +tests/cases/compiler/functionWithSameNameAsField.ts(3,5): error TS2300: Duplicate identifier 'total'. -==== tests/cases/compiler/functionWithSameNameAsField.ts (1 errors) ==== +==== tests/cases/compiler/functionWithSameNameAsField.ts (2 errors) ==== class TestProgressBar { public total: number; - public total(total: number) { ~~~~~ !!! error TS2300: Duplicate identifier 'total'. + public total(total: number) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ this.total = total; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ return this; + ~~~~~~~~~~~~~~~~~~~~ } + ~~~~~ +!!! error TS2300: Duplicate identifier 'total'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericClassesRedeclaration.errors.txt b/tests/baselines/reference/genericClassesRedeclaration.errors.txt index 8cf048c3061..abdea2b052b 100644 --- a/tests/baselines/reference/genericClassesRedeclaration.errors.txt +++ b/tests/baselines/reference/genericClassesRedeclaration.errors.txt @@ -1,9 +1,11 @@ +tests/cases/compiler/genericClassesRedeclaration.ts(16,11): error TS2300: Duplicate identifier 'StringHashTable'. +tests/cases/compiler/genericClassesRedeclaration.ts(29,11): error TS2300: Duplicate identifier 'IdentiferNameHashTable'. tests/cases/compiler/genericClassesRedeclaration.ts(42,9): error TS2374: Duplicate string index signature. tests/cases/compiler/genericClassesRedeclaration.ts(55,11): error TS2300: Duplicate identifier 'StringHashTable'. tests/cases/compiler/genericClassesRedeclaration.ts(68,11): error TS2300: Duplicate identifier 'IdentiferNameHashTable'. -==== tests/cases/compiler/genericClassesRedeclaration.ts (3 errors) ==== +==== tests/cases/compiler/genericClassesRedeclaration.ts (5 errors) ==== declare module TypeScript { interface IIndexable { [s: string]: T; @@ -20,6 +22,8 @@ tests/cases/compiler/genericClassesRedeclaration.ts(68,11): error TS2300: Duplic lookup(key: string): T; } class StringHashTable implements IHashTable { + ~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'StringHashTable'. private itemCount; private table; public getAllKeys(): string[]; @@ -33,6 +37,8 @@ tests/cases/compiler/genericClassesRedeclaration.ts(68,11): error TS2300: Duplic public remove(key: string): void; } class IdentiferNameHashTable extends StringHashTable { + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'IdentiferNameHashTable'. public getAllKeys(): string[]; public add(key: string, data: T): boolean; public addOrUpdate(key: string, data: T): boolean; diff --git a/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt b/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt index ea6068225d9..a7e8155c220 100644 --- a/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt +++ b/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt @@ -1,18 +1,27 @@ tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts(21,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts(1,18): error TS2300: Duplicate identifier '_'. tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts(1,41): error TS2304: Cannot find name '_'. +tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts(2,18): error TS2300: Duplicate identifier '_'. tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts(2,34): error TS2304: Cannot find name '_'. +tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts(4,16): error TS2300: Duplicate identifier '_'. tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts(15,15): error TS2300: Duplicate identifier '_'. -==== tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts (4 errors) ==== +==== tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts (7 errors) ==== declare function _(value: Array): _; + ~ +!!! error TS2300: Duplicate identifier '_'. ~~~~ !!! error TS2304: Cannot find name '_'. declare function _(value: T): _; + ~ +!!! error TS2300: Duplicate identifier '_'. ~~~~ !!! error TS2304: Cannot find name '_'. declare module _ { + ~ +!!! error TS2300: Duplicate identifier '_'. export function each( //list: List, //iterator: ListIterator, diff --git a/tests/baselines/reference/gettersAndSettersErrors.errors.txt b/tests/baselines/reference/gettersAndSettersErrors.errors.txt index b87dba8809c..1cc033cde04 100644 --- a/tests/baselines/reference/gettersAndSettersErrors.errors.txt +++ b/tests/baselines/reference/gettersAndSettersErrors.errors.txt @@ -4,22 +4,28 @@ tests/cases/compiler/gettersAndSettersErrors.ts(6,16): error TS1056: Accessors a tests/cases/compiler/gettersAndSettersErrors.ts(7,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/gettersAndSettersErrors.ts(11,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/gettersAndSettersErrors.ts(12,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/gettersAndSettersErrors.ts(5,12): error TS2300: Duplicate identifier 'Foo'. +tests/cases/compiler/gettersAndSettersErrors.ts(2,16): error TS2300: Duplicate identifier 'Foo'. +tests/cases/compiler/gettersAndSettersErrors.ts(3,16): error TS2300: Duplicate identifier 'Foo'. +tests/cases/compiler/gettersAndSettersErrors.ts(5,5): error TS2300: Duplicate identifier 'Foo'. tests/cases/compiler/gettersAndSettersErrors.ts(11,17): error TS2379: Getter and setter accessors do not agree in visibility. tests/cases/compiler/gettersAndSettersErrors.ts(12,16): error TS2379: Getter and setter accessors do not agree in visibility. -==== tests/cases/compiler/gettersAndSettersErrors.ts (9 errors) ==== +==== tests/cases/compiler/gettersAndSettersErrors.ts (11 errors) ==== class C { public get Foo() { return "foo";} // ok ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + ~~~ +!!! error TS2300: Duplicate identifier 'Foo'. public set Foo(foo:string) {} // ok ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + ~~~ +!!! error TS2300: Duplicate identifier 'Foo'. public Foo = 0; // error - duplicate identifier Foo - confirmed - ~~~ + ~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'Foo'. public get Goo(v:string):string {return null;} // error - getters must not have a parameter ~~~ diff --git a/tests/baselines/reference/giant.errors.txt b/tests/baselines/reference/giant.errors.txt index 01ddc29ea05..46e3632a938 100644 --- a/tests/baselines/reference/giant.errors.txt +++ b/tests/baselines/reference/giant.errors.txt @@ -145,89 +145,143 @@ tests/cases/compiler/giant.ts(672,22): error TS1037: A function implementation c tests/cases/compiler/giant.ts(672,25): error TS1036: Statements are not allowed in ambient contexts. tests/cases/compiler/giant.ts(676,30): error TS1037: A function implementation cannot be declared in an ambient context. tests/cases/compiler/giant.ts(676,33): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/giant.ts(24,16): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(23,12): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(24,5): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(24,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. -tests/cases/compiler/giant.ts(26,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(28,17): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(25,12): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(26,5): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(27,13): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(28,5): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(28,17): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. -tests/cases/compiler/giant.ts(30,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(34,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(36,16): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(29,13): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(30,5): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(33,12): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(34,5): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(35,12): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(36,5): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(36,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(76,5): error TS2386: Overload signatures must all be optional or required. -tests/cases/compiler/giant.ts(88,20): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(87,16): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(88,9): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(88,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. -tests/cases/compiler/giant.ts(90,20): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(92,21): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(89,16): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(90,9): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(91,17): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(92,9): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(92,21): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. -tests/cases/compiler/giant.ts(94,21): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(98,20): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(100,20): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(93,17): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(94,9): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(97,16): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(98,9): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(99,16): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(100,9): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(100,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(140,9): error TS2386: Overload signatures must all be optional or required. -tests/cases/compiler/giant.ts(167,20): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(166,16): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(167,9): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(167,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. -tests/cases/compiler/giant.ts(169,20): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(171,21): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(168,16): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(169,9): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(170,17): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(171,9): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(171,21): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. -tests/cases/compiler/giant.ts(173,21): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(177,20): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(179,20): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(172,17): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(173,9): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(176,16): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(177,9): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(178,16): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(179,9): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(179,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(219,9): error TS2386: Overload signatures must all be optional or required. -tests/cases/compiler/giant.ts(246,20): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(248,20): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(250,21): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(252,21): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(256,20): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(258,20): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(282,16): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(245,16): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(246,9): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(247,16): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(248,9): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(249,17): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(250,9): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(251,17): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(252,9): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(255,16): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(256,9): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(257,16): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(258,9): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(281,12): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(282,5): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(282,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. -tests/cases/compiler/giant.ts(284,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(286,17): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(283,12): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(284,5): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(285,13): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(286,5): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(286,17): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. -tests/cases/compiler/giant.ts(288,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(292,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(294,16): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(287,13): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(288,5): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(291,12): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(292,5): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(293,12): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(294,5): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(294,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(334,5): error TS2386: Overload signatures must all be optional or required. -tests/cases/compiler/giant.ts(346,20): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(345,16): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(346,9): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(346,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. -tests/cases/compiler/giant.ts(348,20): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(350,21): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(347,16): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(348,9): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(349,17): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(350,9): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(350,21): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. -tests/cases/compiler/giant.ts(352,21): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(356,20): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(358,20): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(351,17): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(352,9): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(355,16): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(356,9): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(357,16): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(358,9): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(358,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(398,9): error TS2386: Overload signatures must all be optional or required. -tests/cases/compiler/giant.ts(425,20): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(424,16): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(425,9): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(425,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. -tests/cases/compiler/giant.ts(427,20): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(429,21): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(426,16): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(427,9): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(428,17): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(429,9): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(429,21): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. -tests/cases/compiler/giant.ts(431,21): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(435,20): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(437,20): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(430,17): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(431,9): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(434,16): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(435,9): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(436,16): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(437,9): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(437,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(477,9): error TS2386: Overload signatures must all be optional or required. -tests/cases/compiler/giant.ts(504,20): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(506,20): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(508,21): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(510,21): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(514,20): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(516,20): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(540,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(542,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(544,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(546,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(550,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(552,16): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(503,16): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(504,9): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(505,16): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(506,9): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(507,17): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(508,9): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(509,17): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(510,9): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(513,16): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(514,9): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(515,16): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(516,9): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(539,12): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(540,5): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(541,12): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(542,5): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(543,13): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(544,5): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(545,13): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(546,5): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(549,12): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(550,5): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(551,12): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(552,5): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(602,9): error TS2386: Overload signatures must all be optional or required. tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all be optional or required. -==== tests/cases/compiler/giant.ts (227 errors) ==== +==== tests/cases/compiler/giant.ts (281 errors) ==== /* Prefixes @@ -251,44 +305,56 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all public pF() { } private rF() { } public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. public get pgF() - ~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. public psF(param:any) { } ~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. private get rgF() - ~~~ + ~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'rgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. private rsF(param:any) { } ~~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ !!! error TS1005: '{' expected. static tF() { } static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. static get tgF() - ~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -353,44 +419,56 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all public pF() { } private rF() { } public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. public get pgF() - ~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. public psF(param:any) { } ~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. private get rgF() - ~~~ + ~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'rgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. private rsF(param:any) { } ~~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ !!! error TS1005: '{' expected. static tF() { } static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. static get tgF() - ~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -472,44 +550,56 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all public pF() { } private rF() { } public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. public get pgF() - ~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. public psF(param:any) { } ~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. private get rgF() - ~~~ + ~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'rgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. private rsF(param:any) { } ~~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ !!! error TS1005: '{' expected. static tF() { } static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. static get tgF() - ~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -601,34 +691,42 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all public pgF() { } ~ !!! error TS1037: A function implementation cannot be declared in an ambient context. + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. public get pgF() ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'pgF'. public psF(param:any) { } ~ !!! error TS1037: A function implementation cannot be declared in an ambient context. + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~ !!! error TS1037: A function implementation cannot be declared in an ambient context. + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. private get rgF() ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ + ~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'rgF'. private rsF(param:any) { } ~ !!! error TS1037: A function implementation cannot be declared in an ambient context. + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; static tF() { } @@ -637,18 +735,22 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all static tsF(param:any) { } ~ !!! error TS1037: A function implementation cannot be declared in an ambient context. + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~ !!! error TS1037: A function implementation cannot be declared in an ambient context. + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. static get tgF() ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'tgF'. } export declare module eaM { @@ -681,44 +783,56 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all public pF() { } private rF() { } public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. public get pgF() - ~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. public psF(param:any) { } ~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. private get rgF() - ~~~ + ~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'rgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. private rsF(param:any) { } ~~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ !!! error TS1005: '{' expected. static tF() { } static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. static get tgF() - ~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -783,44 +897,56 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all public pF() { } private rF() { } public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. public get pgF() - ~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. public psF(param:any) { } ~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. private get rgF() - ~~~ + ~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'rgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. private rsF(param:any) { } ~~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ !!! error TS1005: '{' expected. static tF() { } static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. static get tgF() - ~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -902,44 +1028,56 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all public pF() { } private rF() { } public pgF() { } + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. public get pgF() - ~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. public psF(param:any) { } ~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. private get rgF() - ~~~ + ~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'rgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. private rsF(param:any) { } ~~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ !!! error TS1005: '{' expected. static tF() { } static tsF(param:any) { } + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ !!! error TS1005: '{' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. static get tgF() - ~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -1031,34 +1169,42 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all public pgF() { } ~ !!! error TS1037: A function implementation cannot be declared in an ambient context. + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. public get pgF() ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'pgF'. public psF(param:any) { } ~ !!! error TS1037: A function implementation cannot be declared in an ambient context. + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~ !!! error TS1037: A function implementation cannot be declared in an ambient context. + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. private get rgF() ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ + ~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'rgF'. private rsF(param:any) { } ~ !!! error TS1037: A function implementation cannot be declared in an ambient context. + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; static tF() { } @@ -1067,18 +1213,22 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all static tsF(param:any) { } ~ !!! error TS1037: A function implementation cannot be declared in an ambient context. + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~ !!! error TS1037: A function implementation cannot be declared in an ambient context. + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. static get tgF() ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'tgF'. } export declare module eaM { @@ -1121,34 +1271,42 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all public pgF() { } ~ !!! error TS1037: A function implementation cannot be declared in an ambient context. + ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. public get pgF() ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'pgF'. public psF(param:any) { } ~ !!! error TS1037: A function implementation cannot be declared in an ambient context. + ~~~ +!!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~ !!! error TS1037: A function implementation cannot be declared in an ambient context. + ~~~ +!!! error TS2300: Duplicate identifier 'rgF'. private get rgF() ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ + ~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'rgF'. private rsF(param:any) { } ~ !!! error TS1037: A function implementation cannot be declared in an ambient context. + ~~~ +!!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; static tF() { } @@ -1157,18 +1315,22 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all static tsF(param:any) { } ~ !!! error TS1037: A function implementation cannot be declared in an ambient context. + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~ !!! error TS1037: A function implementation cannot be declared in an ambient context. + ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. static get tgF() ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'tgF'. } export declare module eaM { diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt b/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt index 739ca67724f..3ddd9f7c409 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt +++ b/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt @@ -1,13 +1,16 @@ -tests/cases/compiler/importAndVariableDeclarationConflict3.ts(6,8): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/importAndVariableDeclarationConflict3.ts(5,8): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/importAndVariableDeclarationConflict3.ts(6,1): error TS2300: Duplicate identifier 'x'. -==== tests/cases/compiler/importAndVariableDeclarationConflict3.ts (1 errors) ==== +==== tests/cases/compiler/importAndVariableDeclarationConflict3.ts (2 errors) ==== module m { export var m = ''; } - import x = m.m; import x = m.m; ~ !!! error TS2300: Duplicate identifier 'x'. + import x = m.m; + ~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'x'. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceDeclaration1.errors.txt b/tests/baselines/reference/interfaceDeclaration1.errors.txt index a9654fabdcf..43cafecf578 100644 --- a/tests/baselines/reference/interfaceDeclaration1.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration1.errors.txt @@ -1,4 +1,6 @@ +tests/cases/compiler/interfaceDeclaration1.ts(2,5): error TS2300: Duplicate identifier 'item'. tests/cases/compiler/interfaceDeclaration1.ts(3,5): error TS2300: Duplicate identifier 'item'. +tests/cases/compiler/interfaceDeclaration1.ts(7,5): error TS2300: Duplicate identifier 'item'. tests/cases/compiler/interfaceDeclaration1.ts(8,5): error TS2300: Duplicate identifier 'item'. tests/cases/compiler/interfaceDeclaration1.ts(22,11): error TS2310: Type 'I5' recursively references itself as a base type. tests/cases/compiler/interfaceDeclaration1.ts(35,7): error TS2421: Class 'C1' incorrectly implements interface 'I3': @@ -8,18 +10,22 @@ tests/cases/compiler/interfaceDeclaration1.ts(52,11): error TS2320: Interface 'i Named properties 'foo' of types 'i10' and 'i11' are not identical. -==== tests/cases/compiler/interfaceDeclaration1.ts (6 errors) ==== +==== tests/cases/compiler/interfaceDeclaration1.ts (8 errors) ==== interface I1 { - item:number; item:number; ~~~~ +!!! error TS2300: Duplicate identifier 'item'. + item:number; + ~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'item'. } interface I2 { item:any; - item:number; ~~~~ +!!! error TS2300: Duplicate identifier 'item'. + item:number; + ~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'item'. } diff --git a/tests/baselines/reference/interfaceDeclaration2.errors.txt b/tests/baselines/reference/interfaceDeclaration2.errors.txt index 8ef5e1a40d7..9739d946bc5 100644 --- a/tests/baselines/reference/interfaceDeclaration2.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration2.errors.txt @@ -1,11 +1,14 @@ +tests/cases/compiler/interfaceDeclaration2.ts(4,11): error TS2300: Duplicate identifier 'I2'. tests/cases/compiler/interfaceDeclaration2.ts(5,7): error TS2300: Duplicate identifier 'I2'. -==== tests/cases/compiler/interfaceDeclaration2.ts (1 errors) ==== +==== tests/cases/compiler/interfaceDeclaration2.ts (2 errors) ==== interface I1 { } module I1 { } interface I2 { } + ~~ +!!! error TS2300: Duplicate identifier 'I2'. class I2 { } ~~ !!! error TS2300: Duplicate identifier 'I2'. diff --git a/tests/baselines/reference/invalidInstantiatedModule.errors.txt b/tests/baselines/reference/invalidInstantiatedModule.errors.txt index e6cb5491407..5a8ac069803 100644 --- a/tests/baselines/reference/invalidInstantiatedModule.errors.txt +++ b/tests/baselines/reference/invalidInstantiatedModule.errors.txt @@ -1,10 +1,13 @@ +tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts(2,18): error TS2300: Duplicate identifier 'Point'. tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts(3,16): error TS2300: Duplicate identifier 'Point'. tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts(12,8): error TS2304: Cannot find name 'm'. -==== tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts (2 errors) ==== +==== tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts (3 errors) ==== module M { export class Point { x: number; y: number } + ~~~~~ +!!! error TS2300: Duplicate identifier 'Point'. export var Point = 1; // Error ~~~~~ !!! error TS2300: Duplicate identifier 'Point'. diff --git a/tests/baselines/reference/invalidNestedModules.errors.txt b/tests/baselines/reference/invalidNestedModules.errors.txt index 1d7e2641ff4..972c177fc0e 100644 --- a/tests/baselines/reference/invalidNestedModules.errors.txt +++ b/tests/baselines/reference/invalidNestedModules.errors.txt @@ -1,8 +1,9 @@ tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts(1,12): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged +tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts(17,18): error TS2300: Duplicate identifier 'Point'. tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts(24,20): error TS2300: Duplicate identifier 'Point'. -==== tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts (2 errors) ==== +==== tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts (3 errors) ==== module A.B.C { ~ !!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged @@ -22,6 +23,8 @@ tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules. module M2.X { export class Point { + ~~~~~ +!!! error TS2300: Duplicate identifier 'Point'. x: number; y: number; } } diff --git a/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt b/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt index 1bc749ba399..a6bccf35f39 100644 --- a/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt +++ b/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt @@ -1,13 +1,15 @@ +tests/cases/compiler/lastPropertyInLiteralWins.ts(8,5): error TS2300: Duplicate identifier 'thunk'. tests/cases/compiler/lastPropertyInLiteralWins.ts(9,5): error TS2300: Duplicate identifier 'thunk'. tests/cases/compiler/lastPropertyInLiteralWins.ts(12,6): error TS2345: Argument of type '{ thunk: (num: number) => void; }' is not assignable to parameter of type 'Thing'. Types of property 'thunk' are incompatible: Type '(num: number) => void' is not assignable to type '(str: string) => void': Types of parameters 'num' and 'str' are incompatible: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/lastPropertyInLiteralWins.ts(13,5): error TS2300: Duplicate identifier 'thunk'. tests/cases/compiler/lastPropertyInLiteralWins.ts(14,5): error TS2300: Duplicate identifier 'thunk'. -==== tests/cases/compiler/lastPropertyInLiteralWins.ts (3 errors) ==== +==== tests/cases/compiler/lastPropertyInLiteralWins.ts (5 errors) ==== interface Thing { thunk: (str: string) => void; } @@ -16,8 +18,10 @@ tests/cases/compiler/lastPropertyInLiteralWins.ts(14,5): error TS2300: Duplicate } test({ // Should error, as last one wins, and is wrong type thunk: (str: string) => {}, - thunk: (num: number) => {} ~~~~~ +!!! error TS2300: Duplicate identifier 'thunk'. + thunk: (num: number) => {} + ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'thunk'. }); @@ -25,9 +29,11 @@ tests/cases/compiler/lastPropertyInLiteralWins.ts(14,5): error TS2300: Duplicate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ thunk: (num: number) => {}, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~ +!!! error TS2300: Duplicate identifier 'thunk'. thunk: (str: string) => {} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~~~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'thunk'. }); ~ diff --git a/tests/baselines/reference/memberOverride.errors.txt b/tests/baselines/reference/memberOverride.errors.txt index 5cc005b7339..896275c70b1 100644 --- a/tests/baselines/reference/memberOverride.errors.txt +++ b/tests/baselines/reference/memberOverride.errors.txt @@ -1,14 +1,17 @@ +tests/cases/compiler/memberOverride.ts(4,5): error TS2300: Duplicate identifier 'a'. tests/cases/compiler/memberOverride.ts(5,5): error TS2300: Duplicate identifier 'a'. tests/cases/compiler/memberOverride.ts(8,5): error TS2323: Type 'string' is not assignable to type 'number'. -==== tests/cases/compiler/memberOverride.ts (2 errors) ==== +==== tests/cases/compiler/memberOverride.ts (3 errors) ==== // An object initialiser accepts the first definition for the same property with a different type signature // Should compile, since the second declaration of a overrides the first var x = { a: "", - a: 5 ~ +!!! error TS2300: Duplicate identifier 'a'. + a: 5 + ~~~~ !!! error TS2300: Duplicate identifier 'a'. } diff --git a/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames.errors.txt b/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames.errors.txt index 28aa8fa4be8..5ea03a4970e 100644 --- a/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames.errors.txt @@ -1,27 +1,34 @@ +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames.ts(2,5): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames.ts(6,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames.ts(11,9): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames.ts(15,9): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames.ts(33,9): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames.ts(39,9): error TS2300: Duplicate identifier 'x'. -==== tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames.ts (3 errors) ==== +==== tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames.ts (6 errors) ==== interface A { x: string; // error + ~ +!!! error TS2300: Duplicate identifier 'x'. } interface A { x: number; - ~ + ~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. } module M { interface A { x: T; + ~ +!!! error TS2300: Duplicate identifier 'x'. } interface A { x: number; // error - ~ + ~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. } } @@ -41,13 +48,15 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConfli module M3 { export interface A { x: T; + ~ +!!! error TS2300: Duplicate identifier 'x'. } } module M3 { export interface A { x: number; // error - ~ + ~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. } } \ No newline at end of file diff --git a/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames2.errors.txt b/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames2.errors.txt index 74b6c39b1f7..cdf41dfc91d 100644 --- a/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames2.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames2.errors.txt @@ -1,27 +1,34 @@ +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames2.ts(2,5): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames2.ts(6,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames2.ts(11,9): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames2.ts(15,9): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames2.ts(33,9): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames2.ts(39,9): error TS2300: Duplicate identifier 'x'. -==== tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames2.ts (3 errors) ==== - interface A { - x: string; // error - } - +==== tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames2.ts (6 errors) ==== interface A { x: string; // error ~ !!! error TS2300: Duplicate identifier 'x'. } + interface A { + x: string; // error + ~~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'x'. + } + module M { interface A { x: T; + ~ +!!! error TS2300: Duplicate identifier 'x'. } interface A { x: T; // error - ~ + ~~~~~ !!! error TS2300: Duplicate identifier 'x'. } } @@ -41,13 +48,15 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConfli module M3 { export interface A { x: T; + ~ +!!! error TS2300: Duplicate identifier 'x'. } } module M3 { export interface A { x: T; // error - ~ + ~~~~~ !!! error TS2300: Duplicate identifier 'x'. } } \ No newline at end of file diff --git a/tests/baselines/reference/mismatchedClassConstructorVariable.errors.txt b/tests/baselines/reference/mismatchedClassConstructorVariable.errors.txt index e294d8fbc72..8c81f7e34c8 100644 --- a/tests/baselines/reference/mismatchedClassConstructorVariable.errors.txt +++ b/tests/baselines/reference/mismatchedClassConstructorVariable.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/mismatchedClassConstructorVariable.ts(1,5): error TS2300: Duplicate identifier 'baz'. tests/cases/compiler/mismatchedClassConstructorVariable.ts(2,7): error TS2300: Duplicate identifier 'baz'. -==== tests/cases/compiler/mismatchedClassConstructorVariable.ts (1 errors) ==== +==== tests/cases/compiler/mismatchedClassConstructorVariable.ts (2 errors) ==== var baz: foo; + ~~~ +!!! error TS2300: Duplicate identifier 'baz'. class baz { } ~~~ !!! error TS2300: Duplicate identifier 'baz'. diff --git a/tests/baselines/reference/module_augmentExistingAmbientVariable.errors.txt b/tests/baselines/reference/module_augmentExistingAmbientVariable.errors.txt index 6174a6a95db..564da071648 100644 --- a/tests/baselines/reference/module_augmentExistingAmbientVariable.errors.txt +++ b/tests/baselines/reference/module_augmentExistingAmbientVariable.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/module_augmentExistingAmbientVariable.ts(1,13): error TS2300: Duplicate identifier 'console'. tests/cases/compiler/module_augmentExistingAmbientVariable.ts(3,8): error TS2300: Duplicate identifier 'console'. -==== tests/cases/compiler/module_augmentExistingAmbientVariable.ts (1 errors) ==== +==== tests/cases/compiler/module_augmentExistingAmbientVariable.ts (2 errors) ==== declare var console: any; + ~~~~~~~ +!!! error TS2300: Duplicate identifier 'console'. module console { ~~~~~~~ diff --git a/tests/baselines/reference/module_augmentExistingVariable.errors.txt b/tests/baselines/reference/module_augmentExistingVariable.errors.txt index a829d094819..f1d17894077 100644 --- a/tests/baselines/reference/module_augmentExistingVariable.errors.txt +++ b/tests/baselines/reference/module_augmentExistingVariable.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/module_augmentExistingVariable.ts(1,5): error TS2300: Duplicate identifier 'console'. tests/cases/compiler/module_augmentExistingVariable.ts(3,8): error TS2300: Duplicate identifier 'console'. -==== tests/cases/compiler/module_augmentExistingVariable.ts (1 errors) ==== +==== tests/cases/compiler/module_augmentExistingVariable.ts (2 errors) ==== var console: any; + ~~~~~~~ +!!! error TS2300: Duplicate identifier 'console'. module console { ~~~~~~~ diff --git a/tests/baselines/reference/nameCollisions.errors.txt b/tests/baselines/reference/nameCollisions.errors.txt index b587d842c6f..ac4bd770c1d 100644 --- a/tests/baselines/reference/nameCollisions.errors.txt +++ b/tests/baselines/reference/nameCollisions.errors.txt @@ -1,17 +1,27 @@ +tests/cases/compiler/nameCollisions.ts(2,9): error TS2300: Duplicate identifier 'x'. tests/cases/compiler/nameCollisions.ts(4,12): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/nameCollisions.ts(10,12): error TS2300: Duplicate identifier 'z'. tests/cases/compiler/nameCollisions.ts(13,9): error TS2300: Duplicate identifier 'z'. tests/cases/compiler/nameCollisions.ts(15,12): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged -tests/cases/compiler/nameCollisions.ts(25,14): error TS2300: Duplicate identifier 'f'. +tests/cases/compiler/nameCollisions.ts(24,9): error TS2300: Duplicate identifier 'f'. +tests/cases/compiler/nameCollisions.ts(25,5): error TS2300: Duplicate identifier 'f'. +tests/cases/compiler/nameCollisions.ts(27,14): error TS2300: Duplicate identifier 'f2'. tests/cases/compiler/nameCollisions.ts(28,9): error TS2300: Duplicate identifier 'f2'. -tests/cases/compiler/nameCollisions.ts(34,14): error TS2300: Duplicate identifier 'C'. +tests/cases/compiler/nameCollisions.ts(33,11): error TS2300: Duplicate identifier 'C'. +tests/cases/compiler/nameCollisions.ts(34,5): error TS2300: Duplicate identifier 'C'. +tests/cases/compiler/nameCollisions.ts(36,14): error TS2300: Duplicate identifier 'C2'. tests/cases/compiler/nameCollisions.ts(37,11): error TS2300: Duplicate identifier 'C2'. +tests/cases/compiler/nameCollisions.ts(42,11): error TS2300: Duplicate identifier 'cli'. tests/cases/compiler/nameCollisions.ts(43,15): error TS2300: Duplicate identifier 'cli'. +tests/cases/compiler/nameCollisions.ts(45,15): error TS2300: Duplicate identifier 'cli2'. tests/cases/compiler/nameCollisions.ts(46,11): error TS2300: Duplicate identifier 'cli2'. -==== tests/cases/compiler/nameCollisions.ts (9 errors) ==== +==== tests/cases/compiler/nameCollisions.ts (17 errors) ==== module T { var x = 2; + ~ +!!! error TS2300: Duplicate identifier 'x'. module x { // error ~ @@ -22,6 +32,8 @@ tests/cases/compiler/nameCollisions.ts(46,11): error TS2300: Duplicate identifie } module z { + ~ +!!! error TS2300: Duplicate identifier 'z'. var t; } var z; // error @@ -40,11 +52,15 @@ tests/cases/compiler/nameCollisions.ts(46,11): error TS2300: Duplicate identifie module w { } //ok var f; + ~ +!!! error TS2300: Duplicate identifier 'f'. function f() { } //error - ~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'f'. function f2() { } + ~~ +!!! error TS2300: Duplicate identifier 'f2'. var f2; // error ~~ !!! error TS2300: Duplicate identifier 'f2'. @@ -53,11 +69,15 @@ tests/cases/compiler/nameCollisions.ts(46,11): error TS2300: Duplicate identifie interface i { } //ok class C { } + ~ +!!! error TS2300: Duplicate identifier 'C'. function C() { } // error - ~ + ~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'C'. function C2() { } + ~~ +!!! error TS2300: Duplicate identifier 'C2'. class C2 { } // error ~~ !!! error TS2300: Duplicate identifier 'C2'. @@ -66,11 +86,15 @@ tests/cases/compiler/nameCollisions.ts(46,11): error TS2300: Duplicate identifie interface fi { } // ok class cli { } + ~~~ +!!! error TS2300: Duplicate identifier 'cli'. interface cli { } // error ~~~ !!! error TS2300: Duplicate identifier 'cli'. interface cli2 { } + ~~~~ +!!! error TS2300: Duplicate identifier 'cli2'. class cli2 { } // error ~~~~ !!! error TS2300: Duplicate identifier 'cli2'. diff --git a/tests/baselines/reference/numericClassMembers1.errors.txt b/tests/baselines/reference/numericClassMembers1.errors.txt index 28c06a6fcf5..7d17e7cdcbe 100644 --- a/tests/baselines/reference/numericClassMembers1.errors.txt +++ b/tests/baselines/reference/numericClassMembers1.errors.txt @@ -1,19 +1,25 @@ +tests/cases/compiler/numericClassMembers1.ts(2,3): error TS2300: Duplicate identifier '0'. tests/cases/compiler/numericClassMembers1.ts(3,3): error TS2300: Duplicate identifier '0.0'. +tests/cases/compiler/numericClassMembers1.ts(7,3): error TS2300: Duplicate identifier '0.0'. tests/cases/compiler/numericClassMembers1.ts(8,2): error TS2300: Duplicate identifier ''0''. -==== tests/cases/compiler/numericClassMembers1.ts (2 errors) ==== +==== tests/cases/compiler/numericClassMembers1.ts (4 errors) ==== class C234 { 0 = 1; + ~ +!!! error TS2300: Duplicate identifier '0'. 0.0 = 2; - ~~~ + ~~~~~~~~ !!! error TS2300: Duplicate identifier '0.0'. } class C235 { 0.0 = 1; + ~~~ +!!! error TS2300: Duplicate identifier '0.0'. '0' = 2; - ~~~ + ~~~~~~~~ !!! error TS2300: Duplicate identifier ''0''. } diff --git a/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt b/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt index d3192f8e3c5..663cf45fcff 100644 --- a/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt +++ b/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt @@ -1,42 +1,57 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(20,5): error TS1005: ',' expected. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(2,5): error TS2300: Duplicate identifier '1'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(3,5): error TS2300: Duplicate identifier '1.0'. -tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(5,12): error TS2300: Duplicate identifier '2'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(4,12): error TS2300: Duplicate identifier '2'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(5,5): error TS2300: Duplicate identifier '2'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(9,5): error TS2300: Duplicate identifier '2'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(10,5): error TS2300: Duplicate identifier '2.'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(14,5): error TS2300: Duplicate identifier '1'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(15,5): error TS2300: Duplicate identifier '1'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(19,5): error TS2300: Duplicate identifier '2'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(20,5): error TS2300: Duplicate identifier '2'. -==== tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts (6 errors) ==== +==== tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts (11 errors) ==== class C { 1: number; + ~ +!!! error TS2300: Duplicate identifier '1'. 1.0: number; - ~~~ + ~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '1.0'. - static 2: number; static 2: number; ~ +!!! error TS2300: Duplicate identifier '2'. + static 2: number; + ~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '2'. } interface I { 2: number; + ~ +!!! error TS2300: Duplicate identifier '2'. 2.: number; - ~~ + ~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '2.'. } var a: { - 1: number; 1: number; ~ +!!! error TS2300: Duplicate identifier '1'. + 1: number; + ~~~~~~~~~~ !!! error TS2300: Duplicate identifier '1'. } var b = { 2: 1 + ~ +!!! error TS2300: Duplicate identifier '2'. 2: 1 ~ !!! error TS1005: ',' expected. - ~ + ~~~~ !!! error TS2300: Duplicate identifier '2'. } \ No newline at end of file diff --git a/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt b/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt index 9ce36b4937c..a5353efe9ad 100644 --- a/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt +++ b/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt @@ -1,38 +1,50 @@ +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts(4,5): error TS2300: Duplicate identifier '"1"'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts(6,5): error TS2300: Duplicate identifier '1.0'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts(10,5): error TS2300: Duplicate identifier '"1"'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts(12,5): error TS2300: Duplicate identifier '1'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts(16,5): error TS2300: Duplicate identifier '"1"'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts(17,5): error TS2300: Duplicate identifier '1.0'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts(21,5): error TS2300: Duplicate identifier '"0"'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts(22,5): error TS2300: Duplicate identifier '0'. -==== tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts (4 errors) ==== +==== tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts (8 errors) ==== // Each of these types has an error in it. // String named and numeric named properties conflict if they would be equivalent after ToNumber on the property name. class C { "1": number; + ~~~ +!!! error TS2300: Duplicate identifier '"1"'. "1.0": number; // not a duplicate 1.0: number; - ~~~ + ~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '1.0'. } interface I { "1": number; + ~~~ +!!! error TS2300: Duplicate identifier '"1"'. "1.": number; // not a duplicate 1: number; - ~ + ~~~~~~~~~~ !!! error TS2300: Duplicate identifier '1'. } var a: { "1": number; - 1.0: string; ~~~ +!!! error TS2300: Duplicate identifier '"1"'. + 1.0: string; + ~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '1.0'. } var b = { "0": '', + ~~~ +!!! error TS2300: Duplicate identifier '"0"'. 0: '' - ~ + ~~~~~ !!! error TS2300: Duplicate identifier '0'. } \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralErrors.errors.txt b/tests/baselines/reference/objectLiteralErrors.errors.txt index 367043a53ef..a301ae56b5f 100644 --- a/tests/baselines/reference/objectLiteralErrors.errors.txt +++ b/tests/baselines/reference/objectLiteralErrors.errors.txt @@ -18,42 +18,78 @@ tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(37,23) tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(38,27): error TS1119: An object literal cannot have property and accessor with the same name. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(39,26): error TS1119: An object literal cannot have property and accessor with the same name. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(40,46): error TS1119: An object literal cannot have property and accessor with the same name. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(3,12): error TS2300: Duplicate identifier 'a'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(3,18): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(4,12): error TS2300: Duplicate identifier 'a'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(4,19): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(5,12): error TS2300: Duplicate identifier 'a'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(5,18): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(6,12): error TS2300: Duplicate identifier 'a'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(6,21): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(7,12): error TS2300: Duplicate identifier 'a'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(7,19): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(8,12): error TS2300: Duplicate identifier 'a'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(8,18): error TS2300: Duplicate identifier ''a''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(9,12): error TS2300: Duplicate identifier ''a''. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(9,20): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(10,12): error TS2300: Duplicate identifier ''a''. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(10,20): error TS2300: Duplicate identifier '"a"'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(11,12): error TS2300: Duplicate identifier ''a''. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(11,20): error TS2300: Duplicate identifier ''a''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(12,13): error TS2300: Duplicate identifier '"a"'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(12,21): error TS2300: Duplicate identifier ''a''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(13,13): error TS2300: Duplicate identifier '1.0'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(13,21): error TS2300: Duplicate identifier ''1''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(14,13): error TS2300: Duplicate identifier '0'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(14,19): error TS2300: Duplicate identifier '0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(15,13): error TS2300: Duplicate identifier '0'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(15,19): error TS2300: Duplicate identifier '0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(16,13): error TS2300: Duplicate identifier '0'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(16,19): error TS2300: Duplicate identifier '0x0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(17,13): error TS2300: Duplicate identifier '0'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(17,19): error TS2300: Duplicate identifier '000'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(18,13): error TS2300: Duplicate identifier '"100"'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(18,23): error TS2300: Duplicate identifier '1e2'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(19,13): error TS2300: Duplicate identifier '0x20'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(19,22): error TS2300: Duplicate identifier '3.2e1'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(20,13): error TS2300: Duplicate identifier 'a'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(20,25): error TS2300: Duplicate identifier 'a'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(23,22): error TS2300: Duplicate identifier 'a'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(24,23): error TS2300: Duplicate identifier 'a'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(25,22): error TS2300: Duplicate identifier 'a'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(26,25): error TS2300: Duplicate identifier 'a'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(27,23): error TS2300: Duplicate identifier 'a'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(28,22): error TS2300: Duplicate identifier ''a''. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(29,24): error TS2300: Duplicate identifier 'a'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(30,24): error TS2300: Duplicate identifier '"a"'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(31,24): error TS2300: Duplicate identifier ''a''. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(32,25): error TS2300: Duplicate identifier ''a''. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(33,25): error TS2300: Duplicate identifier ''1''. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(34,23): error TS2300: Duplicate identifier '0'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(35,23): error TS2300: Duplicate identifier '0'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(36,23): error TS2300: Duplicate identifier '0x0'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(37,23): error TS2300: Duplicate identifier '000'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(38,27): error TS2300: Duplicate identifier '1e2'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(39,26): error TS2300: Duplicate identifier '3.2e1'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(40,46): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(23,12): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(23,18): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(24,12): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(24,19): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(25,12): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(25,18): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(26,12): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(26,21): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(27,12): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(27,19): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(28,12): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(28,18): error TS2300: Duplicate identifier ''a''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(29,12): error TS2300: Duplicate identifier ''a''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(29,20): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(30,12): error TS2300: Duplicate identifier ''a''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(30,20): error TS2300: Duplicate identifier '"a"'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(31,12): error TS2300: Duplicate identifier ''a''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(31,20): error TS2300: Duplicate identifier ''a''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(32,13): error TS2300: Duplicate identifier '"a"'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(32,21): error TS2300: Duplicate identifier ''a''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(33,13): error TS2300: Duplicate identifier '1.0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(33,21): error TS2300: Duplicate identifier ''1''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(34,13): error TS2300: Duplicate identifier '0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(34,19): error TS2300: Duplicate identifier '0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(35,13): error TS2300: Duplicate identifier '0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(35,19): error TS2300: Duplicate identifier '0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(36,13): error TS2300: Duplicate identifier '0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(36,19): error TS2300: Duplicate identifier '0x0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(37,13): error TS2300: Duplicate identifier '0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(37,19): error TS2300: Duplicate identifier '000'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(38,13): error TS2300: Duplicate identifier '"100"'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(38,23): error TS2300: Duplicate identifier '1e2'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(39,13): error TS2300: Duplicate identifier '0x20'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(39,22): error TS2300: Duplicate identifier '3.2e1'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(40,13): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(40,42): error TS2300: Duplicate identifier 'a'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(43,12): error TS2380: 'get' and 'set' accessor must have the same type. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(43,43): error TS2380: 'get' and 'set' accessor must have the same type. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(44,29): error TS2323: Type 'number' is not assignable to type 'string'. @@ -61,158 +97,230 @@ tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(45,12) tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(45,51): error TS2380: 'get' and 'set' accessor must have the same type. -==== tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts (61 errors) ==== +==== tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts (97 errors) ==== // Multiple properties with the same name var e1 = { a: 0, a: 0 }; - ~ + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~~~~ !!! error TS2300: Duplicate identifier 'a'. var e2 = { a: '', a: '' }; - ~ + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~~~~~ !!! error TS2300: Duplicate identifier 'a'. var e3 = { a: 0, a: '' }; - ~ + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~~~~~ !!! error TS2300: Duplicate identifier 'a'. var e4 = { a: true, a: false }; - ~ + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~~~~~~~~ !!! error TS2300: Duplicate identifier 'a'. var e5 = { a: {}, a: {} }; - ~ + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~~~~~ !!! error TS2300: Duplicate identifier 'a'. var e6 = { a: 0, 'a': 0 }; - ~~~ + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~~~~~~ !!! error TS2300: Duplicate identifier ''a''. var e7 = { 'a': 0, a: 0 }; - ~ + ~~~ +!!! error TS2300: Duplicate identifier ''a''. + ~~~~ !!! error TS2300: Duplicate identifier 'a'. var e8 = { 'a': 0, "a": 0 }; - ~~~ + ~~~ +!!! error TS2300: Duplicate identifier ''a''. + ~~~~~~ !!! error TS2300: Duplicate identifier '"a"'. var e9 = { 'a': 0, 'a': 0 }; - ~~~ + ~~~ +!!! error TS2300: Duplicate identifier ''a''. + ~~~~~~ !!! error TS2300: Duplicate identifier ''a''. var e10 = { "a": 0, 'a': 0 }; - ~~~ + ~~~ +!!! error TS2300: Duplicate identifier '"a"'. + ~~~~~~ !!! error TS2300: Duplicate identifier ''a''. var e11 = { 1.0: 0, '1': 0 }; - ~~~ + ~~~ +!!! error TS2300: Duplicate identifier '1.0'. + ~~~~~~ !!! error TS2300: Duplicate identifier ''1''. var e12 = { 0: 0, 0: 0 }; - ~ + ~ +!!! error TS2300: Duplicate identifier '0'. + ~~~~ !!! error TS2300: Duplicate identifier '0'. var e13 = { 0: 0, 0: 0 }; - ~ + ~ +!!! error TS2300: Duplicate identifier '0'. + ~~~~ !!! error TS2300: Duplicate identifier '0'. var e14 = { 0: 0, 0x0: 0 }; - ~~~ + ~ +!!! error TS2300: Duplicate identifier '0'. + ~~~~~~ !!! error TS2300: Duplicate identifier '0x0'. var e14 = { 0: 0, 000: 0 }; ~~~ !!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. - ~~~ + ~ +!!! error TS2300: Duplicate identifier '0'. + ~~~~~~ !!! error TS2300: Duplicate identifier '000'. var e15 = { "100": 0, 1e2: 0 }; - ~~~ + ~~~~~ +!!! error TS2300: Duplicate identifier '"100"'. + ~~~~~~ !!! error TS2300: Duplicate identifier '1e2'. var e16 = { 0x20: 0, 3.2e1: 0 }; - ~~~~~ + ~~~~ +!!! error TS2300: Duplicate identifier '0x20'. + ~~~~~~~~ !!! error TS2300: Duplicate identifier '3.2e1'. var e17 = { a: 0, b: 1, a: 0 }; - ~ + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~~~~ !!! error TS2300: Duplicate identifier 'a'. // Accessor and property with the same name var f1 = { a: 0, get a() { return 0; } }; ~ !!! error TS1119: An object literal cannot have property and accessor with the same name. - ~ + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'a'. var f2 = { a: '', get a() { return ''; } }; ~ !!! error TS1119: An object literal cannot have property and accessor with the same name. - ~ + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'a'. var f3 = { a: 0, get a() { return ''; } }; ~ !!! error TS1119: An object literal cannot have property and accessor with the same name. - ~ + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'a'. var f4 = { a: true, get a() { return false; } }; ~ !!! error TS1119: An object literal cannot have property and accessor with the same name. - ~ + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'a'. var f5 = { a: {}, get a() { return {}; } }; ~ !!! error TS1119: An object literal cannot have property and accessor with the same name. - ~ + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'a'. var f6 = { a: 0, get 'a'() { return 0; } }; ~~~ !!! error TS1119: An object literal cannot have property and accessor with the same name. - ~~~ + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier ''a''. var f7 = { 'a': 0, get a() { return 0; } }; ~ !!! error TS1119: An object literal cannot have property and accessor with the same name. - ~ + ~~~ +!!! error TS2300: Duplicate identifier ''a''. + ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'a'. var f8 = { 'a': 0, get "a"() { return 0; } }; ~~~ !!! error TS1119: An object literal cannot have property and accessor with the same name. - ~~~ + ~~~ +!!! error TS2300: Duplicate identifier ''a''. + ~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '"a"'. var f9 = { 'a': 0, get 'a'() { return 0; } }; ~~~ !!! error TS1119: An object literal cannot have property and accessor with the same name. - ~~~ + ~~~ +!!! error TS2300: Duplicate identifier ''a''. + ~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier ''a''. var f10 = { "a": 0, get 'a'() { return 0; } }; ~~~ !!! error TS1119: An object literal cannot have property and accessor with the same name. - ~~~ + ~~~ +!!! error TS2300: Duplicate identifier '"a"'. + ~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier ''a''. var f11 = { 1.0: 0, get '1'() { return 0; } }; ~~~ !!! error TS1119: An object literal cannot have property and accessor with the same name. - ~~~ + ~~~ +!!! error TS2300: Duplicate identifier '1.0'. + ~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier ''1''. var f12 = { 0: 0, get 0() { return 0; } }; ~ !!! error TS1119: An object literal cannot have property and accessor with the same name. - ~ + ~ +!!! error TS2300: Duplicate identifier '0'. + ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '0'. var f13 = { 0: 0, get 0() { return 0; } }; ~ !!! error TS1119: An object literal cannot have property and accessor with the same name. - ~ + ~ +!!! error TS2300: Duplicate identifier '0'. + ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '0'. var f14 = { 0: 0, get 0x0() { return 0; } }; ~~~ !!! error TS1119: An object literal cannot have property and accessor with the same name. - ~~~ + ~ +!!! error TS2300: Duplicate identifier '0'. + ~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '0x0'. var f14 = { 0: 0, get 000() { return 0; } }; ~~~ !!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. ~~~ !!! error TS1119: An object literal cannot have property and accessor with the same name. - ~~~ + ~ +!!! error TS2300: Duplicate identifier '0'. + ~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '000'. var f15 = { "100": 0, get 1e2() { return 0; } }; ~~~ !!! error TS1119: An object literal cannot have property and accessor with the same name. - ~~~ + ~~~~~ +!!! error TS2300: Duplicate identifier '"100"'. + ~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '1e2'. var f16 = { 0x20: 0, get 3.2e1() { return 0; } }; ~~~~~ !!! error TS1119: An object literal cannot have property and accessor with the same name. - ~~~~~ + ~~~~ +!!! error TS2300: Duplicate identifier '0x20'. + ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '3.2e1'. var f17 = { a: 0, get b() { return 1; }, get a() { return 0; } }; ~ !!! error TS1119: An object literal cannot have property and accessor with the same name. - ~ + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'a'. // Get and set accessor with mismatched type annotations diff --git a/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt b/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt index 122304d1497..018dae20a79 100644 --- a/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt +++ b/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt @@ -1,70 +1,82 @@ +tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(5,5): error TS2300: Duplicate identifier '1'. tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(6,5): error TS2300: Duplicate identifier '1.0'. tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(7,5): error TS2300: Duplicate identifier '1.'. tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(8,5): error TS2300: Duplicate identifier '1.00'. +tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(12,5): error TS2300: Duplicate identifier '1'. tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(13,5): error TS2300: Duplicate identifier '1.0'. tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(14,5): error TS2300: Duplicate identifier '1.'. tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(15,5): error TS2300: Duplicate identifier '1.00'. +tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(19,5): error TS2300: Duplicate identifier '1'. tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(20,5): error TS2300: Duplicate identifier '1.0'. tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(21,5): error TS2300: Duplicate identifier '1.'. tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(22,5): error TS2300: Duplicate identifier '1.00'. +tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(26,5): error TS2300: Duplicate identifier '1'. tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(27,5): error TS2300: Duplicate identifier '1.0'. tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(28,5): error TS2300: Duplicate identifier '1.'. tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(29,5): error TS2300: Duplicate identifier '1.00'. -==== tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts (12 errors) ==== +==== tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts (16 errors) ==== // numeric properties must be distinct after a ToNumber operation // so the below are all errors class C { 1; + ~ +!!! error TS2300: Duplicate identifier '1'. 1.0; - ~~~ + ~~~~ !!! error TS2300: Duplicate identifier '1.0'. 1.; - ~~ + ~~~ !!! error TS2300: Duplicate identifier '1.'. 1.00; - ~~~~ + ~~~~~ !!! error TS2300: Duplicate identifier '1.00'. } interface I { 1; + ~ +!!! error TS2300: Duplicate identifier '1'. 1.0; - ~~~ + ~~~~ !!! error TS2300: Duplicate identifier '1.0'. 1.; - ~~ + ~~~ !!! error TS2300: Duplicate identifier '1.'. 1.00; - ~~~~ + ~~~~~ !!! error TS2300: Duplicate identifier '1.00'. } var a: { 1; + ~ +!!! error TS2300: Duplicate identifier '1'. 1.0; - ~~~ + ~~~~ !!! error TS2300: Duplicate identifier '1.0'. 1.; - ~~ + ~~~ !!! error TS2300: Duplicate identifier '1.'. 1.00; - ~~~~ + ~~~~~ !!! error TS2300: Duplicate identifier '1.00'. } var b = { 1: 1, + ~ +!!! error TS2300: Duplicate identifier '1'. 1.0: 1, - ~~~ + ~~~~~~ !!! error TS2300: Duplicate identifier '1.0'. 1.: 1, - ~~ + ~~~~~ !!! error TS2300: Duplicate identifier '1.'. 1.00: 1 - ~~~~ + ~~~~~~~ !!! error TS2300: Duplicate identifier '1.00'. } diff --git a/tests/baselines/reference/optionalParamArgsTest.errors.txt b/tests/baselines/reference/optionalParamArgsTest.errors.txt index ed46bfd3344..8f02c603eb7 100644 --- a/tests/baselines/reference/optionalParamArgsTest.errors.txt +++ b/tests/baselines/reference/optionalParamArgsTest.errors.txt @@ -1,4 +1,5 @@ tests/cases/compiler/optionalParamArgsTest.ts(35,47): error TS1016: A required parameter cannot follow an optional parameter. +tests/cases/compiler/optionalParamArgsTest.ts(31,5): error TS2393: Duplicate function implementation. tests/cases/compiler/optionalParamArgsTest.ts(35,5): error TS2393: Duplicate function implementation. tests/cases/compiler/optionalParamArgsTest.ts(99,1): error TS2346: Supplied parameters do not match any signature of call target. tests/cases/compiler/optionalParamArgsTest.ts(100,1): error TS2346: Supplied parameters do not match any signature of call target. @@ -22,7 +23,7 @@ tests/cases/compiler/optionalParamArgsTest.ts(117,1): error TS2346: Supplied par tests/cases/compiler/optionalParamArgsTest.ts(118,1): error TS2346: Supplied parameters do not match any signature of call target. -==== tests/cases/compiler/optionalParamArgsTest.ts (22 errors) ==== +==== tests/cases/compiler/optionalParamArgsTest.ts (23 errors) ==== // Optional parameter and default argument tests // Key: @@ -54,6 +55,8 @@ tests/cases/compiler/optionalParamArgsTest.ts(118,1): error TS2346: Supplied par public C1M4(C1M4A1:number,C1M4A2?:number) { return C1M4A1 + C1M4A2; } public C1M5(C1M5A1:number,C1M5A2:number=0,C1M5A3?:number) { return C1M5A1 + C1M5A2; } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2393: Duplicate function implementation. // Negative test // "Optional parameters may only be followed by other optional parameters" diff --git a/tests/baselines/reference/optionalPropertiesSyntax.errors.txt b/tests/baselines/reference/optionalPropertiesSyntax.errors.txt index 1d081bb64a9..41197ac64e1 100644 --- a/tests/baselines/reference/optionalPropertiesSyntax.errors.txt +++ b/tests/baselines/reference/optionalPropertiesSyntax.errors.txt @@ -8,13 +8,14 @@ tests/cases/compiler/optionalPropertiesSyntax.ts(32,19): error TS1131: Property tests/cases/compiler/optionalPropertiesSyntax.ts(33,5): error TS1131: Property or signature expected. tests/cases/compiler/optionalPropertiesSyntax.ts(34,6): error TS1019: An index signature parameter cannot have a question mark. tests/cases/compiler/optionalPropertiesSyntax.ts(4,5): error TS2386: Overload signatures must all be optional or required. +tests/cases/compiler/optionalPropertiesSyntax.ts(24,5): error TS2300: Duplicate identifier 'prop'. tests/cases/compiler/optionalPropertiesSyntax.ts(25,5): error TS2300: Duplicate identifier 'prop'. tests/cases/compiler/optionalPropertiesSyntax.ts(32,5): error TS2375: Duplicate number index signature. tests/cases/compiler/optionalPropertiesSyntax.ts(33,7): error TS2375: Duplicate number index signature. tests/cases/compiler/optionalPropertiesSyntax.ts(34,5): error TS2375: Duplicate number index signature. -==== tests/cases/compiler/optionalPropertiesSyntax.ts (14 errors) ==== +==== tests/cases/compiler/optionalPropertiesSyntax.ts (15 errors) ==== interface fnSigs { //functions signatures can be optional fn(): void; @@ -51,8 +52,10 @@ tests/cases/compiler/optionalPropertiesSyntax.ts(34,5): error TS2375: Duplicate interface propertySig { //Property signatures can be optional prop: any; - prop?: any; ~~~~ +!!! error TS2300: Duplicate identifier 'prop'. + prop?: any; + ~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'prop'. prop2?: any; } diff --git a/tests/baselines/reference/overloadsWithinClasses.errors.txt b/tests/baselines/reference/overloadsWithinClasses.errors.txt index 1055290316c..39e43d26707 100644 --- a/tests/baselines/reference/overloadsWithinClasses.errors.txt +++ b/tests/baselines/reference/overloadsWithinClasses.errors.txt @@ -1,10 +1,13 @@ +tests/cases/compiler/overloadsWithinClasses.ts(3,5): error TS2393: Duplicate function implementation. tests/cases/compiler/overloadsWithinClasses.ts(5,5): error TS2393: Duplicate function implementation. -==== tests/cases/compiler/overloadsWithinClasses.ts (1 errors) ==== +==== tests/cases/compiler/overloadsWithinClasses.ts (2 errors) ==== class foo { static fnOverload( ) {} + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2393: Duplicate function implementation. static fnOverload(foo: string){ } // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt b/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt index d1a0513c1f6..78a4706ec68 100644 --- a/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt +++ b/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt @@ -1,9 +1,10 @@ tests/cases/compiler/parameterPropertyInConstructor2.ts(3,5): error TS2394: Overload signature is not compatible with function implementation. tests/cases/compiler/parameterPropertyInConstructor2.ts(3,17): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/compiler/parameterPropertyInConstructor2.ts(4,24): error TS2300: Duplicate identifier 'names'. +tests/cases/compiler/parameterPropertyInConstructor2.ts(3,24): error TS2300: Duplicate identifier 'names'. +tests/cases/compiler/parameterPropertyInConstructor2.ts(4,17): error TS2300: Duplicate identifier 'names'. -==== tests/cases/compiler/parameterPropertyInConstructor2.ts (3 errors) ==== +==== tests/cases/compiler/parameterPropertyInConstructor2.ts (4 errors) ==== module mod { class Customers { constructor(public names: string); @@ -11,8 +12,10 @@ tests/cases/compiler/parameterPropertyInConstructor2.ts(4,24): error TS2300: Dup !!! error TS2394: Overload signature is not compatible with function implementation. ~~~~~~~~~~~~~~~~~~~~ !!! error TS2369: A parameter property is only allowed in a constructor implementation. - constructor(public names: string, public ages: number) { ~~~~~ +!!! error TS2300: Duplicate identifier 'names'. + constructor(public names: string, public ages: number) { + ~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'names'. } } diff --git a/tests/baselines/reference/parser0_004152.errors.txt b/tests/baselines/reference/parser0_004152.errors.txt index e1b19738922..cfd6161a48e 100644 --- a/tests/baselines/reference/parser0_004152.errors.txt +++ b/tests/baselines/reference/parser0_004152.errors.txt @@ -19,10 +19,12 @@ tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,94): error T tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,97): error TS1005: ';' expected. tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,98): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,28): error TS2304: Cannot find name 'DisplayPosition'. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,48): error TS2300: Duplicate identifier '3'. tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,51): error TS2300: Duplicate identifier '3'. tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,54): error TS2300: Duplicate identifier '3'. tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,57): error TS2300: Duplicate identifier '3'. tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,60): error TS2300: Duplicate identifier '3'. +tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,63): error TS2300: Duplicate identifier '0'. tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,66): error TS2300: Duplicate identifier '3'. tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,69): error TS2300: Duplicate identifier '3'. tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,72): error TS2300: Duplicate identifier '3'. @@ -34,7 +36,7 @@ tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,96): error T tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(3,25): error TS2304: Cannot find name 'SeedCoords'. -==== tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts (34 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts (36 errors) ==== export class Game { ~~~~ !!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. @@ -79,6 +81,8 @@ tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(3,25): error T !!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. ~~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'DisplayPosition'. + ~ +!!! error TS2300: Duplicate identifier '3'. ~ !!! error TS2300: Duplicate identifier '3'. ~ @@ -87,6 +91,8 @@ tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(3,25): error T !!! error TS2300: Duplicate identifier '3'. ~ !!! error TS2300: Duplicate identifier '3'. + ~ +!!! error TS2300: Duplicate identifier '0'. ~ !!! error TS2300: Duplicate identifier '3'. ~ diff --git a/tests/baselines/reference/parserErrorRecovery_ModuleElement2.errors.txt b/tests/baselines/reference/parserErrorRecovery_ModuleElement2.errors.txt index 23f8d8bc166..ab0327a716f 100644 --- a/tests/baselines/reference/parserErrorRecovery_ModuleElement2.errors.txt +++ b/tests/baselines/reference/parserErrorRecovery_ModuleElement2.errors.txt @@ -1,11 +1,15 @@ tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement2.ts(7,1): error TS1128: Declaration or statement expected. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement2.ts(8,1): error TS1128: Declaration or statement expected. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement2.ts(1,1): error TS2393: Duplicate function implementation. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement2.ts(4,1): error TS2393: Duplicate function implementation. -==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement2.ts (3 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement2.ts (4 errors) ==== function foo() { + ~~~~~~~~~~~~~~~~ } + ~ +!!! error TS2393: Duplicate function implementation. function foo() { ~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/parserMemberFunctionDeclarationAmbiguities1.errors.txt b/tests/baselines/reference/parserMemberFunctionDeclarationAmbiguities1.errors.txt index 1c239f59b22..69db4ac7b57 100644 --- a/tests/baselines/reference/parserMemberFunctionDeclarationAmbiguities1.errors.txt +++ b/tests/baselines/reference/parserMemberFunctionDeclarationAmbiguities1.errors.txt @@ -1,13 +1,21 @@ +tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(2,3): error TS2393: Duplicate function implementation. +tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(3,3): error TS2393: Duplicate function implementation. tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(5,3): error TS2393: Duplicate function implementation. tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(6,3): error TS2393: Duplicate function implementation. +tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(8,3): error TS2393: Duplicate function implementation. +tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(9,3): error TS2393: Duplicate function implementation. tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(11,3): error TS2393: Duplicate function implementation. tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(12,3): error TS2393: Duplicate function implementation. -==== tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts (4 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts (8 errors) ==== class C { public() {} + ~~~~~~~~~~~ +!!! error TS2393: Duplicate function implementation. static() {} + ~~~~~~~~~~~ +!!! error TS2393: Duplicate function implementation. public public() {} ~~~~~~~~~~~~~~~~~~ @@ -17,7 +25,11 @@ tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemb !!! error TS2393: Duplicate function implementation. public static public() {} + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2393: Duplicate function implementation. public static static() {} + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2393: Duplicate function implementation. static public() {} ~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/propertyAndAccessorWithSameName.errors.txt b/tests/baselines/reference/propertyAndAccessorWithSameName.errors.txt index ece553abea8..a08a924ff75 100644 --- a/tests/baselines/reference/propertyAndAccessorWithSameName.errors.txt +++ b/tests/baselines/reference/propertyAndAccessorWithSameName.errors.txt @@ -2,45 +2,58 @@ tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWi tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(10,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(18,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(3,9): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(10,9): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(15,9): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(18,9): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(2,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(3,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(9,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(10,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(14,13): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(15,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(18,5): error TS2300: Duplicate identifier 'x'. -==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts (8 errors) ==== +==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts (11 errors) ==== class C { x: number; + ~ +!!! error TS2300: Duplicate identifier 'x'. get x() { // error ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ -!!! error TS2300: Duplicate identifier 'x'. + ~~~~~~~~~~~~~~~~~~ return 1; + ~~~~~~~~~~~~~~~~~ } + ~~~~~ +!!! error TS2300: Duplicate identifier 'x'. } class D { x: number; + ~ +!!! error TS2300: Duplicate identifier 'x'. set x(v) { } // error ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ + ~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. } class E { private x: number; + ~ +!!! error TS2300: Duplicate identifier 'x'. get x() { // error ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ -!!! error TS2300: Duplicate identifier 'x'. + ~~~~~~~~~~~~~~~~~~ return 1; + ~~~~~~~~~~~~~~~~~ } + ~~~~~ +!!! error TS2300: Duplicate identifier 'x'. set x(v) { } ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ + ~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/propertyAndFunctionWithSameName.errors.txt b/tests/baselines/reference/propertyAndFunctionWithSameName.errors.txt index a98382863a4..58b51c9c39e 100644 --- a/tests/baselines/reference/propertyAndFunctionWithSameName.errors.txt +++ b/tests/baselines/reference/propertyAndFunctionWithSameName.errors.txt @@ -1,20 +1,28 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndFunctionWithSameName.ts(2,5): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndFunctionWithSameName.ts(3,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndFunctionWithSameName.ts(9,5): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndFunctionWithSameName.ts(10,5): error TS2300: Duplicate identifier 'x'. -==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndFunctionWithSameName.ts (2 errors) ==== +==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndFunctionWithSameName.ts (4 errors) ==== class C { x: number; - x() { // error ~ !!! error TS2300: Duplicate identifier 'x'. + x() { // error + ~~~~~~~~~~~~~~ return 1; + ~~~~~~~~~~~~~~~~~ } + ~~~~~ +!!! error TS2300: Duplicate identifier 'x'. } class D { x: number; - x(v) { } // error ~ +!!! error TS2300: Duplicate identifier 'x'. + x(v) { } // error + ~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/propertyNamedPrototype.errors.txt b/tests/baselines/reference/propertyNamedPrototype.errors.txt index 6ce4054fb43..38f8279daed 100644 --- a/tests/baselines/reference/propertyNamedPrototype.errors.txt +++ b/tests/baselines/reference/propertyNamedPrototype.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedPrototype.ts(3,12): error TS2300: Duplicate identifier 'prototype'. +tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedPrototype.ts(3,5): error TS2300: Duplicate identifier 'prototype'. ==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedPrototype.ts (1 errors) ==== class C { prototype: number; // ok static prototype: C; // error - ~~~~~~~~~ + ~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'prototype'. } \ No newline at end of file diff --git a/tests/baselines/reference/propertySignatures.errors.txt b/tests/baselines/reference/propertySignatures.errors.txt index d5ab5678c00..c6bc759dce8 100644 --- a/tests/baselines/reference/propertySignatures.errors.txt +++ b/tests/baselines/reference/propertySignatures.errors.txt @@ -1,11 +1,14 @@ +tests/cases/compiler/propertySignatures.ts(2,13): error TS2300: Duplicate identifier 'a'. tests/cases/compiler/propertySignatures.ts(2,23): error TS2300: Duplicate identifier 'a'. tests/cases/compiler/propertySignatures.ts(14,12): error TS2304: Cannot find name 'foo'. -==== tests/cases/compiler/propertySignatures.ts (2 errors) ==== +==== tests/cases/compiler/propertySignatures.ts (3 errors) ==== // Should be error - duplicate identifiers var foo1: { a:string; a: string; }; - ~ + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'a'. // Should be OK diff --git a/tests/baselines/reference/reassignStaticProp.errors.txt b/tests/baselines/reference/reassignStaticProp.errors.txt index eb373437609..e1d845c20e4 100644 --- a/tests/baselines/reference/reassignStaticProp.errors.txt +++ b/tests/baselines/reference/reassignStaticProp.errors.txt @@ -1,13 +1,16 @@ -tests/cases/compiler/reassignStaticProp.ts(5,12): error TS2300: Duplicate identifier 'bar'. +tests/cases/compiler/reassignStaticProp.ts(3,12): error TS2300: Duplicate identifier 'bar'. +tests/cases/compiler/reassignStaticProp.ts(5,5): error TS2300: Duplicate identifier 'bar'. -==== tests/cases/compiler/reassignStaticProp.ts (1 errors) ==== +==== tests/cases/compiler/reassignStaticProp.ts (2 errors) ==== class foo { static bar = 1; + ~~~ +!!! error TS2300: Duplicate identifier 'bar'. static bar:string; // errror - duplicate id - ~~~ + ~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'bar'. } diff --git a/tests/baselines/reference/sourceMapValidationEnums.errors.txt b/tests/baselines/reference/sourceMapValidationEnums.errors.txt index 4ecb81edeea..ae42f0b00b2 100644 --- a/tests/baselines/reference/sourceMapValidationEnums.errors.txt +++ b/tests/baselines/reference/sourceMapValidationEnums.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/sourceMapValidationEnums.ts(2,5): error TS2300: Duplicate identifier 'x'. tests/cases/compiler/sourceMapValidationEnums.ts(4,5): error TS2300: Duplicate identifier 'x'. -==== tests/cases/compiler/sourceMapValidationEnums.ts (1 errors) ==== +==== tests/cases/compiler/sourceMapValidationEnums.ts (2 errors) ==== enum e { x, + ~ +!!! error TS2300: Duplicate identifier 'x'. y, x ~ diff --git a/tests/baselines/reference/staticClassMemberError.errors.txt b/tests/baselines/reference/staticClassMemberError.errors.txt index e0768b03967..9483e3387b7 100644 --- a/tests/baselines/reference/staticClassMemberError.errors.txt +++ b/tests/baselines/reference/staticClassMemberError.errors.txt @@ -1,9 +1,10 @@ tests/cases/compiler/staticClassMemberError.ts(4,3): error TS2304: Cannot find name 's'. +tests/cases/compiler/staticClassMemberError.ts(9,10): error TS2300: Duplicate identifier 'Foo'. tests/cases/compiler/staticClassMemberError.ts(9,10): error TS2391: Function implementation is missing or not immediately following the declaration. tests/cases/compiler/staticClassMemberError.ts(10,7): error TS2300: Duplicate identifier 'Foo'. -==== tests/cases/compiler/staticClassMemberError.ts (3 errors) ==== +==== tests/cases/compiler/staticClassMemberError.ts (4 errors) ==== class C { static s; public a() { @@ -16,6 +17,8 @@ tests/cases/compiler/staticClassMemberError.ts(10,7): error TS2300: Duplicate id // just want to make sure this one doesn't crash the compiler function Foo(); ~~~ +!!! error TS2300: Duplicate identifier 'Foo'. + ~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. class Foo { ~~~ diff --git a/tests/baselines/reference/staticPrototypeProperty.errors.txt b/tests/baselines/reference/staticPrototypeProperty.errors.txt index 19b3f3ffb20..32d4438a2cc 100644 --- a/tests/baselines/reference/staticPrototypeProperty.errors.txt +++ b/tests/baselines/reference/staticPrototypeProperty.errors.txt @@ -1,16 +1,16 @@ -tests/cases/compiler/staticPrototypeProperty.ts(2,11): error TS2300: Duplicate identifier 'prototype'. -tests/cases/compiler/staticPrototypeProperty.ts(6,11): error TS2300: Duplicate identifier 'prototype'. +tests/cases/compiler/staticPrototypeProperty.ts(2,4): error TS2300: Duplicate identifier 'prototype'. +tests/cases/compiler/staticPrototypeProperty.ts(6,4): error TS2300: Duplicate identifier 'prototype'. ==== tests/cases/compiler/staticPrototypeProperty.ts (2 errors) ==== class C { static prototype() { } - ~~~~~~~~~ + ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'prototype'. } class C2 { static prototype; - ~~~~~~~~~ + ~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'prototype'. } \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.errors.txt b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.errors.txt index ed30960896e..80857aa1804 100644 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.errors.txt +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.errors.txt @@ -8,11 +8,12 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralType tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(20,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(21,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(22,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(26,5): error TS2300: Duplicate identifier 'foo'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(26,5): error TS2381: A signature with an implementation cannot use a string literal type. tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(27,5): error TS2300: Duplicate identifier 'foo'. -==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts (12 errors) ==== +==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts (13 errors) ==== // String literal types are only valid in overload signatures function foo(x: any); @@ -59,10 +60,12 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralType var b = { foo(x: 'hi') { }, + ~~~ +!!! error TS2300: Duplicate identifier 'foo'. ~~~~~~~~~~~~~~~~ !!! error TS2381: A signature with an implementation cannot use a string literal type. foo(x: 'a') { }, - ~~~ + ~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'foo'. } \ No newline at end of file diff --git a/tests/baselines/reference/stringNamedPropertyDuplicates.errors.txt b/tests/baselines/reference/stringNamedPropertyDuplicates.errors.txt index 8e8af394d39..9c929aa47ce 100644 --- a/tests/baselines/reference/stringNamedPropertyDuplicates.errors.txt +++ b/tests/baselines/reference/stringNamedPropertyDuplicates.errors.txt @@ -1,42 +1,57 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(20,5): error TS1005: ',' expected. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(2,5): error TS2300: Duplicate identifier '"a b"'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(3,5): error TS2300: Duplicate identifier '"a b"'. -tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(5,12): error TS2300: Duplicate identifier '"c d"'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(4,12): error TS2300: Duplicate identifier '"c d"'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(5,5): error TS2300: Duplicate identifier '"c d"'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(9,5): error TS2300: Duplicate identifier '"a b"'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(10,5): error TS2300: Duplicate identifier '"a b"'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(14,5): error TS2300: Duplicate identifier '"a b"'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(15,5): error TS2300: Duplicate identifier '"a b"'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(19,5): error TS2300: Duplicate identifier '"a b"'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(20,5): error TS2300: Duplicate identifier '"a b"'. -==== tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts (6 errors) ==== +==== tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts (11 errors) ==== class C { - "a b": number; "a b": number; ~~~~~ !!! error TS2300: Duplicate identifier '"a b"'. - static "c d": number; + "a b": number; + ~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '"a b"'. static "c d": number; ~~~~~ +!!! error TS2300: Duplicate identifier '"c d"'. + static "c d": number; + ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '"c d"'. } interface I { - "a b": number; "a b": number; ~~~~~ +!!! error TS2300: Duplicate identifier '"a b"'. + "a b": number; + ~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '"a b"'. } var a: { - "a b": number; "a b": number; ~~~~~ +!!! error TS2300: Duplicate identifier '"a b"'. + "a b": number; + ~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '"a b"'. } var b = { "a b": 1 + ~~~~~ +!!! error TS2300: Duplicate identifier '"a b"'. "a b": 1 ~~~~~ !!! error TS1005: ',' expected. - ~~~~~ + ~~~~~~~~ !!! error TS2300: Duplicate identifier '"a b"'. } \ No newline at end of file diff --git a/tests/baselines/reference/targetTypeCastTest.errors.txt b/tests/baselines/reference/targetTypeCastTest.errors.txt index b719ac656fe..c00ddb36728 100644 --- a/tests/baselines/reference/targetTypeCastTest.errors.txt +++ b/tests/baselines/reference/targetTypeCastTest.errors.txt @@ -1,15 +1,21 @@ -tests/cases/compiler/targetTypeCastTest.ts(3,10): error TS2300: Duplicate identifier 'Point'. +tests/cases/compiler/targetTypeCastTest.ts(1,13): error TS2300: Duplicate identifier 'Point'. +tests/cases/compiler/targetTypeCastTest.ts(3,1): error TS2300: Duplicate identifier 'Point'. -==== tests/cases/compiler/targetTypeCastTest.ts (1 errors) ==== +==== tests/cases/compiler/targetTypeCastTest.ts (2 errors) ==== declare var Point: { new(x:number, y:number): {x: number; y: number; }; } + ~~~~~ +!!! error TS2300: Duplicate identifier 'Point'. function Point(x, y) { - ~~~~~ -!!! error TS2300: Duplicate identifier 'Point'. + ~~~~~~~~~~~~~~~~~~~~~~ this.x = x; + ~~~~~~~~~~~~~~~ this.y = y; + ~~~~~~~~~~~~~~~~~~ } + ~ +!!! error TS2300: Duplicate identifier 'Point'. interface Adder { (x: number, y: number): number; diff --git a/tests/baselines/reference/targetTypeTest1.errors.txt b/tests/baselines/reference/targetTypeTest1.errors.txt index dccc680abaa..1b515bee0fa 100644 --- a/tests/baselines/reference/targetTypeTest1.errors.txt +++ b/tests/baselines/reference/targetTypeTest1.errors.txt @@ -1,10 +1,14 @@ -tests/cases/compiler/targetTypeTest1.ts(14,10): error TS2300: Duplicate identifier 'Point'. +tests/cases/compiler/targetTypeTest1.ts(1,15): error TS2300: Duplicate identifier 'Point'. +tests/cases/compiler/targetTypeTest1.ts(14,1): error TS2300: Duplicate identifier 'Point'. tests/cases/compiler/targetTypeTest1.ts(19,18): error TS2384: Overload signatures must all be ambient or non-ambient. -tests/cases/compiler/targetTypeTest1.ts(60,10): error TS2300: Duplicate identifier 'C'. +tests/cases/compiler/targetTypeTest1.ts(53,15): error TS2300: Duplicate identifier 'C'. +tests/cases/compiler/targetTypeTest1.ts(60,1): error TS2300: Duplicate identifier 'C'. -==== tests/cases/compiler/targetTypeTest1.ts (3 errors) ==== +==== tests/cases/compiler/targetTypeTest1.ts (5 errors) ==== declare class Point + ~~~~~ +!!! error TS2300: Duplicate identifier 'Point'. { constructor(x: number, y: number); public x: number; @@ -18,11 +22,14 @@ tests/cases/compiler/targetTypeTest1.ts(60,10): error TS2300: Duplicate identifi // Because Point is a constructor function, this is inferred // to be Point and return type is inferred to be void function Point(x, y) { - ~~~~~ -!!! error TS2300: Duplicate identifier 'Point'. + ~~~~~~~~~~~~~~~~~~~~~~ this.x = x; + ~~~~~~~~~~~~~~~ this.y = y; + ~~~~~~~~~~~~~~~ } + ~ +!!! error TS2300: Duplicate identifier 'Point'. declare function EF1(a:number, b:number):number; ~~~ @@ -61,6 +68,8 @@ tests/cases/compiler/targetTypeTest1.ts(60,10): error TS2300: Duplicate identifi } declare class C { + ~ +!!! error TS2300: Duplicate identifier 'C'. constructor(a:number, b:number); public a : number; public b: number; @@ -68,11 +77,14 @@ tests/cases/compiler/targetTypeTest1.ts(60,10): error TS2300: Duplicate identifi } function C(a,b) { - ~ -!!! error TS2300: Duplicate identifier 'C'. + ~~~~~~~~~~~~~~~~~ this.a=a; + ~~~~~~~~~~ this.b=b; + ~~~~~~~~~~ } + ~ +!!! error TS2300: Duplicate identifier 'C'. C.prototype = { a:0, diff --git a/tests/baselines/reference/twoAccessorsWithSameName.errors.txt b/tests/baselines/reference/twoAccessorsWithSameName.errors.txt index 6b4990ceeda..fc7b86873f1 100644 --- a/tests/baselines/reference/twoAccessorsWithSameName.errors.txt +++ b/tests/baselines/reference/twoAccessorsWithSameName.errors.txt @@ -9,20 +9,25 @@ tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameN tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(24,9): error TS1118: An object literal cannot have multiple get/set accessors with the same name. tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(30,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(33,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(3,9): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(8,9): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(24,9): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(2,9): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(3,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(7,9): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(8,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(19,9): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(24,5): error TS2300: Duplicate identifier 'x'. -==== tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts (14 errors) ==== +==== tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts (17 errors) ==== class C { get x() { return 1; } ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + ~ +!!! error TS2300: Duplicate identifier 'x'. get x() { return 1; } // error ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ + ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. } @@ -30,10 +35,12 @@ tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameN set x(v) { } ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + ~ +!!! error TS2300: Duplicate identifier 'x'. set x(v) { } // error ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ + ~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. } @@ -52,6 +59,8 @@ tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameN get x() { ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + ~ +!!! error TS2300: Duplicate identifier 'x'. return 1; }, @@ -61,10 +70,12 @@ tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameN !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ !!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. - ~ -!!! error TS2300: Duplicate identifier 'x'. + ~~~~~~~~~ return 1; + ~~~~~~~~~~~~~~~~~ } + ~~~~~ +!!! error TS2300: Duplicate identifier 'x'. } var y = { diff --git a/tests/baselines/reference/twoAccessorsWithSameName2.errors.txt b/tests/baselines/reference/twoAccessorsWithSameName2.errors.txt index 2a6db805b19..d431ed5a828 100644 --- a/tests/baselines/reference/twoAccessorsWithSameName2.errors.txt +++ b/tests/baselines/reference/twoAccessorsWithSameName2.errors.txt @@ -4,19 +4,23 @@ tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameN tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(8,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(12,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(15,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(3,16): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(8,16): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(2,16): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(3,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(7,16): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(8,5): error TS2300: Duplicate identifier 'x'. -==== tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts (8 errors) ==== +==== tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts (10 errors) ==== class C { static get x() { return 1; } ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + ~ +!!! error TS2300: Duplicate identifier 'x'. static get x() { return 1; } // error ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. } @@ -24,10 +28,12 @@ tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameN static set x(v) { } ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + ~ +!!! error TS2300: Duplicate identifier 'x'. static set x(v) { } // error ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ + ~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'x'. } diff --git a/tests/baselines/reference/varAndFunctionShareName.errors.txt b/tests/baselines/reference/varAndFunctionShareName.errors.txt index aa518152fcc..f849bfdfb54 100644 --- a/tests/baselines/reference/varAndFunctionShareName.errors.txt +++ b/tests/baselines/reference/varAndFunctionShareName.errors.txt @@ -1,8 +1,11 @@ -tests/cases/compiler/varAndFunctionShareName.ts(2,10): error TS2300: Duplicate identifier 'myFn'. +tests/cases/compiler/varAndFunctionShareName.ts(1,5): error TS2300: Duplicate identifier 'myFn'. +tests/cases/compiler/varAndFunctionShareName.ts(2,1): error TS2300: Duplicate identifier 'myFn'. -==== tests/cases/compiler/varAndFunctionShareName.ts (1 errors) ==== +==== tests/cases/compiler/varAndFunctionShareName.ts (2 errors) ==== var myFn; + ~~~~ +!!! error TS2300: Duplicate identifier 'myFn'. function myFn(): any { } - ~~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'myFn'. \ No newline at end of file diff --git a/tests/cases/compiler/augmentedTypesClass2.ts b/tests/cases/compiler/augmentedTypesClass2.ts index a744e2e62e1..c6d64e2bf82 100644 --- a/tests/cases/compiler/augmentedTypesClass2.ts +++ b/tests/cases/compiler/augmentedTypesClass2.ts @@ -1,7 +1,7 @@ // Checking class with other things in type space not value space // class then interface -class c11 { +class c11 { // error foo() { return 1; } diff --git a/tests/cases/compiler/augmentedTypesClass2a.ts b/tests/cases/compiler/augmentedTypesClass2a.ts index ebb1bf6b1b5..c8098a7f133 100644 --- a/tests/cases/compiler/augmentedTypesClass2a.ts +++ b/tests/cases/compiler/augmentedTypesClass2a.ts @@ -1,4 +1,4 @@ //// class then function -class c2 { public foo() { } } +class c2 { public foo() { } } // error function c2() { } // error var c2 = () => { } \ No newline at end of file diff --git a/tests/cases/compiler/augmentedTypesClass4.ts b/tests/cases/compiler/augmentedTypesClass4.ts index 54d96b617e5..d8ab0708272 100644 --- a/tests/cases/compiler/augmentedTypesClass4.ts +++ b/tests/cases/compiler/augmentedTypesClass4.ts @@ -1,3 +1,3 @@ //// class then class -class c3 { public foo() { } } +class c3 { public foo() { } } // error class c3 { public bar() { } } // error diff --git a/tests/cases/compiler/augmentedTypesEnum.ts b/tests/cases/compiler/augmentedTypesEnum.ts index 96ec07fef39..2efcde826ce 100644 --- a/tests/cases/compiler/augmentedTypesEnum.ts +++ b/tests/cases/compiler/augmentedTypesEnum.ts @@ -1,23 +1,23 @@ // enum then var -enum e1111 { One } +enum e1111 { One } // error var e1111 = 1; // error // enum then function -enum e2 { One } +enum e2 { One } // error function e2() { } // error -enum e3 { One } +enum e3 { One } // error var e3 = () => { } // error // enum then class -enum e4 { One } +enum e4 { One } // error class e4 { public foo() { } } // error // enum then enum enum e5 { One } -enum e5 { Two } +enum e5 { Two } // error -enum e5a { One } +enum e5a { One } // error enum e5a { One } // error // enum then internal module diff --git a/tests/cases/compiler/augmentedTypesEnum2.ts b/tests/cases/compiler/augmentedTypesEnum2.ts index 8801c5d935b..2ad69c12f02 100644 --- a/tests/cases/compiler/augmentedTypesEnum2.ts +++ b/tests/cases/compiler/augmentedTypesEnum2.ts @@ -1,14 +1,14 @@ // enum then interface -enum e1 { One } +enum e1 { One } // error -interface e1 { +interface e1 { // error foo(): void; } // interface then enum works // enum then class -enum e2 { One }; +enum e2 { One }; // error class e2 { // error foo() { return 1; diff --git a/tests/cases/compiler/augmentedTypesFunction.ts b/tests/cases/compiler/augmentedTypesFunction.ts index 14bb1f718e8..ab6627f9463 100644 --- a/tests/cases/compiler/augmentedTypesFunction.ts +++ b/tests/cases/compiler/augmentedTypesFunction.ts @@ -1,23 +1,23 @@ // function then var -function y1() { } +function y1() { } // error var y1 = 1; // error // function then function -function y2() { } +function y2() { } // error function y2() { } // error -function y2a() { } +function y2a() { } // error var y2a = () => { } // error // function then class -function y3() { } +function y3() { } // error class y3 { } // error -function y3a() { } +function y3a() { } // error class y3a { public foo() { } } // error // function then enum -function y4() { } +function y4() { } // error enum y4 { One } // error // function then internal module diff --git a/tests/cases/compiler/augmentedTypesInterface.ts b/tests/cases/compiler/augmentedTypesInterface.ts index b9f84d4d8b2..72c85d6619d 100644 --- a/tests/cases/compiler/augmentedTypesInterface.ts +++ b/tests/cases/compiler/augmentedTypesInterface.ts @@ -9,7 +9,7 @@ interface i { } // interface then class -interface i2 { +interface i2 { // error foo(): void; } @@ -20,7 +20,7 @@ class i2 { // error } // interface then enum -interface i3 { +interface i3 { // error foo(): void; } enum i3 { One }; // error diff --git a/tests/cases/compiler/augmentedTypesModules.ts b/tests/cases/compiler/augmentedTypesModules.ts index 6857abf1718..84f03549a42 100644 --- a/tests/cases/compiler/augmentedTypesModules.ts +++ b/tests/cases/compiler/augmentedTypesModules.ts @@ -2,18 +2,18 @@ module m1 { } var m1 = 1; // Should be allowed -module m1a { var y = 2; } -var m1a = 1; +module m1a { var y = 2; } // error +var m1a = 1; // error -module m1b { export var y = 2; } -var m1b = 1; +module m1b { export var y = 2; } // error +var m1b = 1; // error module m1c { export interface I { foo(): void; } } var m1c = 1; // Should be allowed -module m1d { +module m1d { // error export class I { foo() { } } } var m1d = 1; // error diff --git a/tests/cases/compiler/augmentedTypesVar.ts b/tests/cases/compiler/augmentedTypesVar.ts index 75cab810c13..c7e40c8b0e7 100644 --- a/tests/cases/compiler/augmentedTypesVar.ts +++ b/tests/cases/compiler/augmentedTypesVar.ts @@ -3,17 +3,17 @@ var x1 = 1; var x1 = 2; // var then function -var x2 = 1; -function x2() { } // should be an error +var x2 = 1; // error +function x2() { } // error -var x3 = 1; -var x3 = () => { } // should be an error +var x3 = 1; +var x3 = () => { } // error // var then class -var x4 = 1; +var x4 = 1; // error class x4 { } // error -var x4a = 1; +var x4a = 1; // error class x4a { public foo() { } } // error // var then enum @@ -24,10 +24,10 @@ enum x5 { One } // error var x6 = 1; module x6 { } // ok since non-instantiated -var x6a = 1; +var x6a = 1; // error module x6a { var y = 2; } // error since instantiated -var x6b = 1; +var x6b = 1; // error module x6b { export var y = 2; } // error // var then import, messes with other error reporting diff --git a/tests/cases/compiler/callOnInstance.ts b/tests/cases/compiler/callOnInstance.ts index 0125121c12a..0b38dcd12cd 100644 --- a/tests/cases/compiler/callOnInstance.ts +++ b/tests/cases/compiler/callOnInstance.ts @@ -1,6 +1,6 @@ -declare function D(): string; +declare function D(): string; // error -declare class D { constructor (value: number); } // Duplicate identifier +declare class D { constructor (value: number); } // error var s1: string = D(); // OK diff --git a/tests/cases/compiler/callOverloads1.ts b/tests/cases/compiler/callOverloads1.ts index 17abfb7890a..e2ce278eec0 100644 --- a/tests/cases/compiler/callOverloads1.ts +++ b/tests/cases/compiler/callOverloads1.ts @@ -1,4 +1,4 @@ -class Foo { +class Foo { // error bar1() { /*WScript.Echo("bar1");*/ } constructor(x: any) { diff --git a/tests/cases/compiler/callOverloads2.ts b/tests/cases/compiler/callOverloads2.ts index a5db65f505a..3379838dbcf 100644 --- a/tests/cases/compiler/callOverloads2.ts +++ b/tests/cases/compiler/callOverloads2.ts @@ -1,6 +1,6 @@ -class Foo { +class Foo { // error bar1() { /*WScript.Echo("bar1");*/ } constructor(x: any) { @@ -8,10 +8,10 @@ class Foo { } } -function Foo(); +function Foo(); // error -function F1(s:string) {return s;} -function F1(a:any) { return a;} // error - duplicate identifier +function F1(s:string) {return s;} // error +function F1(a:any) { return a;} // error function Goo(s:string); // error - no implementation diff --git a/tests/cases/compiler/callOverloads3.ts b/tests/cases/compiler/callOverloads3.ts index 6b7e1bba907..be14dd478fa 100644 --- a/tests/cases/compiler/callOverloads3.ts +++ b/tests/cases/compiler/callOverloads3.ts @@ -1,7 +1,7 @@ -function Foo():Foo; -function Foo(s:string):Foo; -class Foo { +function Foo():Foo; // error +function Foo(s:string):Foo; // error +class Foo { // error bar1() { /*WScript.Echo("bar1");*/ } constructor(x: any) { // WScript.Echo("Constructor function has executed"); diff --git a/tests/cases/compiler/callOverloads4.ts b/tests/cases/compiler/callOverloads4.ts index 58d89c53bdc..3957c822cc9 100644 --- a/tests/cases/compiler/callOverloads4.ts +++ b/tests/cases/compiler/callOverloads4.ts @@ -1,7 +1,7 @@ -function Foo():Foo; -function Foo(s:string):Foo; -class Foo { +function Foo():Foo; // error +function Foo(s:string):Foo; // error +class Foo { // error bar1() { /*WScript.Echo("bar1");*/ } constructor(s: string); constructor(x: any) { diff --git a/tests/cases/compiler/callOverloads5.ts b/tests/cases/compiler/callOverloads5.ts index 9e491f7d257..212b68b168a 100644 --- a/tests/cases/compiler/callOverloads5.ts +++ b/tests/cases/compiler/callOverloads5.ts @@ -1,6 +1,6 @@ -function Foo():Foo; -function Foo(s:string):Foo; -class Foo { +function Foo():Foo; // error +function Foo(s:string):Foo; // error +class Foo { // error bar1(s:string); bar1(n:number); bar1(a:any) { /*WScript.Echo(a);*/ } diff --git a/tests/cases/compiler/class1.ts b/tests/cases/compiler/class1.ts index d7c7ce2ae0a..c7b2115b88b 100644 --- a/tests/cases/compiler/class1.ts +++ b/tests/cases/compiler/class1.ts @@ -1,2 +1,2 @@ -interface foo{ } -class foo{ } \ No newline at end of file +interface foo{ } // error +class foo{ } // error \ No newline at end of file diff --git a/tests/cases/compiler/classAndInterface1.ts b/tests/cases/compiler/classAndInterface1.ts index 06ada1c8a49..79b02915857 100644 --- a/tests/cases/compiler/classAndInterface1.ts +++ b/tests/cases/compiler/classAndInterface1.ts @@ -1,2 +1,2 @@ -class cli { } + class cli { } // error interface cli { } // error \ No newline at end of file diff --git a/tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.ts b/tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.ts index 13bc603fada..cd42d742101 100644 --- a/tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.ts +++ b/tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.ts @@ -1,8 +1,8 @@ -class C { foo: string; } +class C { foo: string; } // error var C = ''; // error module M { - class D { + class D { // error bar: string; } diff --git a/tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts b/tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts index 3744cb1f5f4..b3f535c4c3d 100644 --- a/tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts +++ b/tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts @@ -1,9 +1,9 @@ class C { - constructor() { } + constructor() { } // error constructor(x) { } // error } class D { - constructor(x: T) { } + constructor(x: T) { } // error constructor(x: T, y: T) { } // error } \ No newline at end of file diff --git a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts index 3164e0a4734..04f1acd84ca 100644 --- a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts +++ b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts @@ -17,8 +17,8 @@ c.foo(); c.foo(1); var b = { - foo(x = 1), - foo(x = 1) { }, + foo(x = 1), // error + foo(x = 1) { }, // error } b.foo(); From fe80647a7a32e22d25fbbe8d4c315118ec7929a7 Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 1 Oct 2014 11:06:18 -0700 Subject: [PATCH 3/5] Fix error reporting position --- src/compiler/binder.ts | 2 +- src/compiler/checker.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 44ebd50c066..cc876f4e8cf 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -89,7 +89,7 @@ module ts { forEach(symbol.declarations, (declaration) => { file.semanticErrors.push(createDiagnosticForNode(declaration.name, Diagnostics.Duplicate_identifier_0, getDisplayName(declaration))); }); - file.semanticErrors.push(createDiagnosticForNode(node, Diagnostics.Duplicate_identifier_0, getDisplayName(node))); + file.semanticErrors.push(createDiagnosticForNode(node.name, Diagnostics.Duplicate_identifier_0, getDisplayName(node))); symbol = createSymbol(0, name); } diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 0ef10ed8189..f1de90565a3 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5727,7 +5727,7 @@ module ts { if (duplicateFunctionDeclaration) { forEach( declarations, declaration => { - error(declaration, Diagnostics.Duplicate_function_implementation); + error(declaration.name, Diagnostics.Duplicate_function_implementation); }); } From 296e8e01b372ba836e37432f9540f2d77879fe1f Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 1 Oct 2014 11:27:20 -0700 Subject: [PATCH 4/5] Update Baselines --- ...lassStaticFunctionOfTheSameName.errors.txt | 10 +- ...lassStaticFunctionOfTheSameName.errors.txt | 10 +- ...dExportedFunctionThatShareAName.errors.txt | 8 +- ...ambientClassOverloadForFunction.errors.txt | 4 +- .../baselines/reference/anyDeclare.errors.txt | 4 +- .../augmentedTypesClass2a.errors.txt | 4 +- .../reference/augmentedTypesEnum.errors.txt | 4 +- .../augmentedTypesFunction.errors.txt | 8 +- .../reference/augmentedTypesVar.errors.txt | 4 +- .../reference/callOverloads1.errors.txt | 4 +- .../reference/callOverloads2.errors.txt | 22 +- tests/baselines/reference/callOverloads2.js | 12 +- .../reference/callOverloads3.errors.txt | 6 +- tests/baselines/reference/callOverloads3.js | 6 +- .../reference/callOverloads4.errors.txt | 6 +- tests/baselines/reference/callOverloads4.js | 6 +- .../reference/callOverloads5.errors.txt | 6 +- tests/baselines/reference/callOverloads5.js | 6 +- ...gnaturesWithDuplicateParameters.errors.txt | 26 +-- ...turesWithParameterInitializers2.errors.txt | 6 +- tests/baselines/reference/class1.errors.txt | 4 +- tests/baselines/reference/class1.js | 6 +- .../reference/classAndInterface1.errors.txt | 6 +- .../baselines/reference/classAndInterface1.js | 4 +- .../classAndVariableWithSameName.errors.txt | 4 +- .../reference/classAndVariableWithSameName.js | 6 +- .../classOverloadForFunction.errors.txt | 4 +- ...ssWithTwoConstructorDefinitions.errors.txt | 4 +- .../classWithTwoConstructorDefinitions.js | 8 +- .../cloduleWithDuplicateMember1.errors.txt | 8 +- .../cloduleWithDuplicateMember2.errors.txt | 4 +- .../conflictingTypeAnnotatedVar.errors.txt | 8 +- ...ssibilityModifiersOnParameters2.errors.txt | 12 +- .../constructorOverloads4.errors.txt | 8 +- .../constructorOverloads7.errors.txt | 11 +- ...constructorParameterProperties2.errors.txt | 12 +- .../reference/contextualTyping.errors.txt | 11 +- ...faceIncompatibleWithBaseIndexer.errors.txt | 2 +- .../duplicateClassElements.errors.txt | 63 +++-- ...duplicateIdentifierInCatchBlock.errors.txt | 8 +- .../duplicateInterfaceMembers1.errors.txt | 2 +- .../duplicateObjectLiteralProperty.errors.txt | 17 +- ...duplicatePropertiesInStrictMode.errors.txt | 2 +- .../duplicatePropertyNames.errors.txt | 22 +- .../duplicateStringNamedProperty1.errors.txt | 2 +- .../reference/es6ClassTest9.errors.txt | 4 +- .../exportSameNameFuncVar.errors.txt | 9 +- .../fieldAndGetterWithSameName.errors.txt | 4 +- .../baselines/reference/funClodule.errors.txt | 4 +- ...functionAndPropertyNameConflict.errors.txt | 10 +- .../reference/functionCall15.errors.txt | 4 +- .../functionNameConflicts.errors.txt | 8 +- .../functionWithSameNameAsField.errors.txt | 13 +- .../gettersAndSettersErrors.errors.txt | 4 +- tests/baselines/reference/giant.errors.txt | 216 +++++++++--------- ...AndVariableDeclarationConflict3.errors.txt | 4 +- .../interfaceDeclaration1.errors.txt | 4 +- .../lastPropertyInLiteralWins.errors.txt | 4 +- .../reference/memberOverride.errors.txt | 2 +- ...cesWithConflictingPropertyNames.errors.txt | 6 +- ...esWithConflictingPropertyNames2.errors.txt | 6 +- .../reference/nameCollisions.errors.txt | 8 +- .../reference/numericClassMembers1.errors.txt | 4 +- .../numericNamedPropertyDuplicates.errors.txt | 12 +- ...cStringNamedPropertyEquivalence.errors.txt | 8 +- .../reference/objectLiteralErrors.errors.txt | 108 ++++----- ...ypeWithDuplicateNumericProperty.errors.txt | 24 +- .../optionalParamArgsTest.errors.txt | 8 +- .../optionalPropertiesSyntax.errors.txt | 2 +- .../overloadsWithinClasses.errors.txt | 8 +- ...parameterPropertyInConstructor2.errors.txt | 4 +- ...serErrorRecovery_ModuleElement2.errors.txt | 14 +- ...FunctionDeclarationAmbiguities1.errors.txt | 28 +-- ...propertyAndAccessorWithSameName.errors.txt | 28 +-- ...propertyAndFunctionWithSameName.errors.txt | 10 +- .../propertyNamedPrototype.errors.txt | 4 +- .../reference/propertySignatures.errors.txt | 2 +- .../reference/reassignStaticProp.errors.txt | 4 +- .../staticPrototypeProperty.errors.txt | 8 +- ...ypesInImplementationSignatures2.errors.txt | 2 +- .../stringNamedPropertyDuplicates.errors.txt | 12 +- .../reference/targetTypeCastTest.errors.txt | 13 +- .../reference/targetTypeTest1.errors.txt | 26 +-- .../twoAccessorsWithSameName.errors.txt | 18 +- .../twoAccessorsWithSameName2.errors.txt | 8 +- .../varAndFunctionShareName.errors.txt | 4 +- tests/cases/compiler/callOverloads2.ts | 2 +- tests/cases/compiler/callOverloads4.ts | 2 +- ...unctionInDuplicatedConstructorClassBody.ts | 2 +- .../inheritedModuleMembersForClodule2.ts | 2 +- ...nStatementInDuplicateIdentifierFunction.ts | 4 +- 91 files changed, 515 insertions(+), 566 deletions(-) diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt index ed1c8eaec85..d200258fdb1 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts(5,12): error TS2300: Duplicate identifier 'fn'. -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts(10,5): error TS2300: Duplicate identifier 'fn'. +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts(10,21): error TS2300: Duplicate identifier 'fn'. ==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts (2 errors) ==== @@ -15,12 +15,10 @@ tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMer module clodule { // error: duplicate identifier expected export function fn(x: T, y: T): T { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - return x; - ~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~~ !!! error TS2300: Duplicate identifier 'fn'. + return x; + } } \ No newline at end of file diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt index bf1c4f36d1b..474613e283f 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts(5,12): error TS2300: Duplicate identifier 'fn'. -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts(10,5): error TS2300: Duplicate identifier 'fn'. +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts(10,21): error TS2300: Duplicate identifier 'fn'. ==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts (2 errors) ==== @@ -15,12 +15,10 @@ tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMer module clodule { // error: duplicate identifier expected export function fn(x: T, y: T): T { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - return x; - ~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~~ !!! error TS2300: Duplicate identifier 'fn'. + return x; + } } \ No newline at end of file diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt index b3c2a87e176..a59953e7fb2 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt @@ -1,7 +1,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(4,12): error TS2300: Duplicate identifier 'Origin'. -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(8,5): error TS2300: Duplicate identifier 'Origin'. +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(8,21): error TS2300: Duplicate identifier 'Origin'. tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(16,16): error TS2300: Duplicate identifier 'Origin'. -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(20,9): error TS2300: Duplicate identifier 'Origin'. +tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(20,25): error TS2300: Duplicate identifier 'Origin'. ==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts (4 errors) ==== @@ -15,7 +15,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMer module Point { export function Origin() { return null; } //expected duplicate identifier error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2300: Duplicate identifier 'Origin'. } @@ -31,7 +31,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMer export module Point { export function Origin() { return ""; }//expected duplicate identifier error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2300: Duplicate identifier 'Origin'. } } \ No newline at end of file diff --git a/tests/baselines/reference/ambientClassOverloadForFunction.errors.txt b/tests/baselines/reference/ambientClassOverloadForFunction.errors.txt index a63f795ec88..16df32bb2c5 100644 --- a/tests/baselines/reference/ambientClassOverloadForFunction.errors.txt +++ b/tests/baselines/reference/ambientClassOverloadForFunction.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/ambientClassOverloadForFunction.ts(1,15): error TS2300: Duplicate identifier 'foo'. -tests/cases/compiler/ambientClassOverloadForFunction.ts(2,1): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/ambientClassOverloadForFunction.ts(2,10): error TS2300: Duplicate identifier 'foo'. ==== tests/cases/compiler/ambientClassOverloadForFunction.ts (2 errors) ==== @@ -7,6 +7,6 @@ tests/cases/compiler/ambientClassOverloadForFunction.ts(2,1): error TS2300: Dupl ~~~ !!! error TS2300: Duplicate identifier 'foo'. function foo() { return null; } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/anyDeclare.errors.txt b/tests/baselines/reference/anyDeclare.errors.txt index ec21bd1e859..8eda3672f24 100644 --- a/tests/baselines/reference/anyDeclare.errors.txt +++ b/tests/baselines/reference/anyDeclare.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/anyDeclare.ts(3,9): error TS2300: Duplicate identifier 'myFn'. -tests/cases/compiler/anyDeclare.ts(4,5): error TS2300: Duplicate identifier 'myFn'. +tests/cases/compiler/anyDeclare.ts(4,14): error TS2300: Duplicate identifier 'myFn'. ==== tests/cases/compiler/anyDeclare.ts (2 errors) ==== @@ -9,7 +9,7 @@ tests/cases/compiler/anyDeclare.ts(4,5): error TS2300: Duplicate identifier 'myF ~~~~ !!! error TS2300: Duplicate identifier 'myFn'. function myFn() { } - ~~~~~~~~~~~~~~~~~~~~ + ~~~~ !!! error TS2300: Duplicate identifier 'myFn'. } \ No newline at end of file diff --git a/tests/baselines/reference/augmentedTypesClass2a.errors.txt b/tests/baselines/reference/augmentedTypesClass2a.errors.txt index ed6c556a826..b17ab32d408 100644 --- a/tests/baselines/reference/augmentedTypesClass2a.errors.txt +++ b/tests/baselines/reference/augmentedTypesClass2a.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/augmentedTypesClass2a.ts(2,7): error TS2300: Duplicate identifier 'c2'. -tests/cases/compiler/augmentedTypesClass2a.ts(3,1): error TS2300: Duplicate identifier 'c2'. +tests/cases/compiler/augmentedTypesClass2a.ts(3,10): error TS2300: Duplicate identifier 'c2'. tests/cases/compiler/augmentedTypesClass2a.ts(4,5): error TS2300: Duplicate identifier 'c2'. @@ -9,7 +9,7 @@ tests/cases/compiler/augmentedTypesClass2a.ts(4,5): error TS2300: Duplicate iden ~~ !!! error TS2300: Duplicate identifier 'c2'. function c2() { } // error - ~~~~~~~~~~~~~~~~~ + ~~ !!! error TS2300: Duplicate identifier 'c2'. var c2 = () => { } ~~ diff --git a/tests/baselines/reference/augmentedTypesEnum.errors.txt b/tests/baselines/reference/augmentedTypesEnum.errors.txt index 6e04f9bfcf1..3102f9d4786 100644 --- a/tests/baselines/reference/augmentedTypesEnum.errors.txt +++ b/tests/baselines/reference/augmentedTypesEnum.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/augmentedTypesEnum.ts(2,6): error TS2300: Duplicate identifier 'e1111'. tests/cases/compiler/augmentedTypesEnum.ts(3,5): error TS2300: Duplicate identifier 'e1111'. tests/cases/compiler/augmentedTypesEnum.ts(6,6): error TS2300: Duplicate identifier 'e2'. -tests/cases/compiler/augmentedTypesEnum.ts(7,1): error TS2300: Duplicate identifier 'e2'. +tests/cases/compiler/augmentedTypesEnum.ts(7,10): error TS2300: Duplicate identifier 'e2'. tests/cases/compiler/augmentedTypesEnum.ts(9,6): error TS2300: Duplicate identifier 'e3'. tests/cases/compiler/augmentedTypesEnum.ts(10,5): error TS2300: Duplicate identifier 'e3'. tests/cases/compiler/augmentedTypesEnum.ts(13,6): error TS2300: Duplicate identifier 'e4'. @@ -26,7 +26,7 @@ tests/cases/compiler/augmentedTypesEnum.ts(21,12): error TS2432: In an enum with ~~ !!! error TS2300: Duplicate identifier 'e2'. function e2() { } // error - ~~~~~~~~~~~~~~~~~ + ~~ !!! error TS2300: Duplicate identifier 'e2'. enum e3 { One } // error diff --git a/tests/baselines/reference/augmentedTypesFunction.errors.txt b/tests/baselines/reference/augmentedTypesFunction.errors.txt index 60d6dd3b30d..8d1ce671c9e 100644 --- a/tests/baselines/reference/augmentedTypesFunction.errors.txt +++ b/tests/baselines/reference/augmentedTypesFunction.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/augmentedTypesFunction.ts(2,10): error TS2300: Duplicate identifier 'y1'. tests/cases/compiler/augmentedTypesFunction.ts(3,5): error TS2300: Duplicate identifier 'y1'. -tests/cases/compiler/augmentedTypesFunction.ts(6,1): error TS2393: Duplicate function implementation. -tests/cases/compiler/augmentedTypesFunction.ts(7,1): error TS2393: Duplicate function implementation. +tests/cases/compiler/augmentedTypesFunction.ts(6,10): error TS2393: Duplicate function implementation. +tests/cases/compiler/augmentedTypesFunction.ts(7,10): error TS2393: Duplicate function implementation. tests/cases/compiler/augmentedTypesFunction.ts(9,10): error TS2300: Duplicate identifier 'y2a'. tests/cases/compiler/augmentedTypesFunction.ts(10,5): error TS2300: Duplicate identifier 'y2a'. tests/cases/compiler/augmentedTypesFunction.ts(13,10): error TS2300: Duplicate identifier 'y3'. @@ -23,10 +23,10 @@ tests/cases/compiler/augmentedTypesFunction.ts(21,6): error TS2300: Duplicate id // function then function function y2() { } // error - ~~~~~~~~~~~~~~~~~ + ~~ !!! error TS2393: Duplicate function implementation. function y2() { } // error - ~~~~~~~~~~~~~~~~~ + ~~ !!! error TS2393: Duplicate function implementation. function y2a() { } // error diff --git a/tests/baselines/reference/augmentedTypesVar.errors.txt b/tests/baselines/reference/augmentedTypesVar.errors.txt index ee4319baffb..24c194d25c3 100644 --- a/tests/baselines/reference/augmentedTypesVar.errors.txt +++ b/tests/baselines/reference/augmentedTypesVar.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/augmentedTypesVar.ts(6,5): error TS2300: Duplicate identifier 'x2'. -tests/cases/compiler/augmentedTypesVar.ts(7,1): error TS2300: Duplicate identifier 'x2'. +tests/cases/compiler/augmentedTypesVar.ts(7,10): error TS2300: Duplicate identifier 'x2'. tests/cases/compiler/augmentedTypesVar.ts(10,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x3' must be of type 'number', but here has type '() => void'. tests/cases/compiler/augmentedTypesVar.ts(13,5): error TS2300: Duplicate identifier 'x4'. tests/cases/compiler/augmentedTypesVar.ts(14,7): error TS2300: Duplicate identifier 'x4'. @@ -23,7 +23,7 @@ tests/cases/compiler/augmentedTypesVar.ts(31,8): error TS2300: Duplicate identif ~~ !!! error TS2300: Duplicate identifier 'x2'. function x2() { } // error - ~~~~~~~~~~~~~~~~~ + ~~ !!! error TS2300: Duplicate identifier 'x2'. var x3 = 1; diff --git a/tests/baselines/reference/callOverloads1.errors.txt b/tests/baselines/reference/callOverloads1.errors.txt index 1f778a42cdf..64927462104 100644 --- a/tests/baselines/reference/callOverloads1.errors.txt +++ b/tests/baselines/reference/callOverloads1.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/callOverloads1.ts(1,7): error TS2300: Duplicate identifier 'Foo'. -tests/cases/compiler/callOverloads1.ts(9,1): error TS2300: Duplicate identifier 'Foo'. +tests/cases/compiler/callOverloads1.ts(9,10): error TS2300: Duplicate identifier 'Foo'. tests/cases/compiler/callOverloads1.ts(9,10): error TS2391: Function implementation is missing or not immediately following the declaration. tests/cases/compiler/callOverloads1.ts(17,1): error TS2348: Value of type 'typeof Foo' is not callable. Did you mean to include 'new'? @@ -16,7 +16,7 @@ tests/cases/compiler/callOverloads1.ts(17,1): error TS2348: Value of type 'typeo } function Foo(); // error - ~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'Foo'. ~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. diff --git a/tests/baselines/reference/callOverloads2.errors.txt b/tests/baselines/reference/callOverloads2.errors.txt index 3759ae719c9..6291fa8f3de 100644 --- a/tests/baselines/reference/callOverloads2.errors.txt +++ b/tests/baselines/reference/callOverloads2.errors.txt @@ -1,8 +1,8 @@ tests/cases/compiler/callOverloads2.ts(3,7): error TS2300: Duplicate identifier 'Foo'. -tests/cases/compiler/callOverloads2.ts(11,1): error TS2300: Duplicate identifier 'Foo'. -tests/cases/compiler/callOverloads2.ts(13,1): error TS2393: Duplicate function implementation. +tests/cases/compiler/callOverloads2.ts(11,10): error TS2300: Duplicate identifier 'Foo'. tests/cases/compiler/callOverloads2.ts(13,10): error TS2389: Function implementation name must be 'Foo'. -tests/cases/compiler/callOverloads2.ts(14,1): error TS2393: Duplicate function implementation. +tests/cases/compiler/callOverloads2.ts(13,10): error TS2393: Duplicate function implementation. +tests/cases/compiler/callOverloads2.ts(14,10): error TS2393: Duplicate function implementation. tests/cases/compiler/callOverloads2.ts(16,10): error TS2391: Function implementation is missing or not immediately following the declaration. tests/cases/compiler/callOverloads2.ts(24,1): error TS2348: Value of type 'typeof Foo' is not callable. Did you mean to include 'new'? @@ -10,7 +10,7 @@ tests/cases/compiler/callOverloads2.ts(24,1): error TS2348: Value of type 'typeo ==== tests/cases/compiler/callOverloads2.ts (7 errors) ==== - class Foo { + class Foo { // error ~~~ !!! error TS2300: Duplicate identifier 'Foo'. bar1() { /*WScript.Echo("bar1");*/ } @@ -20,17 +20,17 @@ tests/cases/compiler/callOverloads2.ts(24,1): error TS2348: Value of type 'typeo } } - function Foo(); - ~~~~~~~~~~~~~~~ + function Foo(); // error + ~~~ !!! error TS2300: Duplicate identifier 'Foo'. - function F1(s:string) {return s;} - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2393: Duplicate function implementation. + function F1(s:string) {return s;} // error ~~ !!! error TS2389: Function implementation name must be 'Foo'. - function F1(a:any) { return a;} // error - duplicate identifier - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~ +!!! error TS2393: Duplicate function implementation. + function F1(a:any) { return a;} // error + ~~ !!! error TS2393: Duplicate function implementation. function Goo(s:string); // error - no implementation diff --git a/tests/baselines/reference/callOverloads2.js b/tests/baselines/reference/callOverloads2.js index be42753bc3d..e3cbceb177a 100644 --- a/tests/baselines/reference/callOverloads2.js +++ b/tests/baselines/reference/callOverloads2.js @@ -1,7 +1,7 @@ //// [callOverloads2.ts] -class Foo { +class Foo { // error bar1() { /*WScript.Echo("bar1");*/ } constructor(x: any) { @@ -9,10 +9,10 @@ class Foo { } } -function Foo(); +function Foo(); // error -function F1(s:string) {return s;} -function F1(a:any) { return a;} // error - duplicate identifier +function F1(s:string) {return s;} // error +function F1(a:any) { return a;} // error function Goo(s:string); // error - no implementation @@ -36,10 +36,10 @@ var Foo = (function () { })(); function F1(s) { return s; -} +} // error function F1(a) { return a; -} // error - duplicate identifier +} // error var f1 = new Foo("hey"); f1.bar1(); Foo(); diff --git a/tests/baselines/reference/callOverloads3.errors.txt b/tests/baselines/reference/callOverloads3.errors.txt index 86124251752..ecb889bc1ab 100644 --- a/tests/baselines/reference/callOverloads3.errors.txt +++ b/tests/baselines/reference/callOverloads3.errors.txt @@ -9,19 +9,19 @@ tests/cases/compiler/callOverloads3.ts(12,10): error TS2350: Only a void functio ==== tests/cases/compiler/callOverloads3.ts (7 errors) ==== - function Foo():Foo; + function Foo():Foo; // error ~~~ !!! error TS2300: Duplicate identifier 'Foo'. ~~~ !!! error TS2304: Cannot find name 'Foo'. - function Foo(s:string):Foo; + function Foo(s:string):Foo; // error ~~~ !!! error TS2300: Duplicate identifier 'Foo'. ~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. ~~~ !!! error TS2304: Cannot find name 'Foo'. - class Foo { + class Foo { // error ~~~ !!! error TS2300: Duplicate identifier 'Foo'. bar1() { /*WScript.Echo("bar1");*/ } diff --git a/tests/baselines/reference/callOverloads3.js b/tests/baselines/reference/callOverloads3.js index 93176cc1edb..85c16fe85a6 100644 --- a/tests/baselines/reference/callOverloads3.js +++ b/tests/baselines/reference/callOverloads3.js @@ -1,8 +1,8 @@ //// [callOverloads3.ts] -function Foo():Foo; -function Foo(s:string):Foo; -class Foo { +function Foo():Foo; // error +function Foo(s:string):Foo; // error +class Foo { // error bar1() { /*WScript.Echo("bar1");*/ } constructor(x: any) { // WScript.Echo("Constructor function has executed"); diff --git a/tests/baselines/reference/callOverloads4.errors.txt b/tests/baselines/reference/callOverloads4.errors.txt index 24d304b45c6..3010d7c15d8 100644 --- a/tests/baselines/reference/callOverloads4.errors.txt +++ b/tests/baselines/reference/callOverloads4.errors.txt @@ -9,19 +9,19 @@ tests/cases/compiler/callOverloads4.ts(12,10): error TS2350: Only a void functio ==== tests/cases/compiler/callOverloads4.ts (7 errors) ==== - function Foo():Foo; + function Foo():Foo; // error ~~~ !!! error TS2300: Duplicate identifier 'Foo'. ~~~ !!! error TS2304: Cannot find name 'Foo'. - function Foo(s:string):Foo; + function Foo(s:string):Foo; // error ~~~ !!! error TS2300: Duplicate identifier 'Foo'. ~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. ~~~ !!! error TS2304: Cannot find name 'Foo'. - class Foo { + class Foo { // error ~~~ !!! error TS2300: Duplicate identifier 'Foo'. bar1() { /*WScript.Echo("bar1");*/ } diff --git a/tests/baselines/reference/callOverloads4.js b/tests/baselines/reference/callOverloads4.js index 86ec2b91e7e..6aab555b721 100644 --- a/tests/baselines/reference/callOverloads4.js +++ b/tests/baselines/reference/callOverloads4.js @@ -1,8 +1,8 @@ //// [callOverloads4.ts] -function Foo():Foo; -function Foo(s:string):Foo; -class Foo { +function Foo():Foo; // error +function Foo(s:string):Foo; // error +class Foo { // error bar1() { /*WScript.Echo("bar1");*/ } constructor(s: string); constructor(x: any) { diff --git a/tests/baselines/reference/callOverloads5.errors.txt b/tests/baselines/reference/callOverloads5.errors.txt index a2a8711d211..e521a9a9076 100644 --- a/tests/baselines/reference/callOverloads5.errors.txt +++ b/tests/baselines/reference/callOverloads5.errors.txt @@ -8,19 +8,19 @@ tests/cases/compiler/callOverloads5.ts(13,10): error TS2350: Only a void functio ==== tests/cases/compiler/callOverloads5.ts (7 errors) ==== - function Foo():Foo; + function Foo():Foo; // error ~~~ !!! error TS2300: Duplicate identifier 'Foo'. ~~~ !!! error TS2304: Cannot find name 'Foo'. - function Foo(s:string):Foo; + function Foo(s:string):Foo; // error ~~~ !!! error TS2300: Duplicate identifier 'Foo'. ~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. ~~~ !!! error TS2304: Cannot find name 'Foo'. - class Foo { + class Foo { // error ~~~ !!! error TS2300: Duplicate identifier 'Foo'. bar1(s:string); diff --git a/tests/baselines/reference/callOverloads5.js b/tests/baselines/reference/callOverloads5.js index 30cc65915ec..2220568e4c2 100644 --- a/tests/baselines/reference/callOverloads5.js +++ b/tests/baselines/reference/callOverloads5.js @@ -1,7 +1,7 @@ //// [callOverloads5.ts] -function Foo():Foo; -function Foo(s:string):Foo; -class Foo { +function Foo():Foo; // error +function Foo(s:string):Foo; // error +class Foo { // error bar1(s:string); bar1(n:number); bar1(a:any) { /*WScript.Echo(a);*/ } diff --git a/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt b/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt index c87eb32515e..034aa4039cf 100644 --- a/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt +++ b/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt @@ -70,28 +70,28 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWit var f4 = (x: T, x: T) => { } ~ !!! error TS2300: Duplicate identifier 'x'. - ~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. function foo2(x: string, x: number) { } ~ !!! error TS2300: Duplicate identifier 'x'. - ~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. var f5 = function foo(x: string, x: number) { } ~ !!! error TS2300: Duplicate identifier 'x'. - ~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. var f6 = function (x: string, x: number) { } ~ !!! error TS2300: Duplicate identifier 'x'. - ~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. var f7 = (x: string, x: number) => { } ~ !!! error TS2300: Duplicate identifier 'x'. - ~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. var f8 = (x: T, y: T) => { } @@ -104,12 +104,12 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWit foo2(x: number, x: string) { } ~ !!! error TS2300: Duplicate identifier 'x'. - ~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. foo3(x: T, x: T) { } ~ !!! error TS2300: Duplicate identifier 'x'. - ~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } @@ -122,7 +122,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWit (x: string, x: number); ~ !!! error TS2300: Duplicate identifier 'x'. - ~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. foo(x, x); ~ @@ -132,12 +132,12 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWit foo(x: number, x: string); ~ !!! error TS2300: Duplicate identifier 'x'. - ~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. foo3(x: T, x: T); ~ !!! error TS2300: Duplicate identifier 'x'. - ~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } @@ -150,7 +150,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWit foo2(x: number, x: string); ~ !!! error TS2300: Duplicate identifier 'x'. - ~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. }; @@ -163,11 +163,11 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWit a: function foo(x: number, x: string) { }, ~ !!! error TS2300: Duplicate identifier 'x'. - ~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. b: (x: T, x: T) => { } ~ !!! error TS2300: Duplicate identifier 'x'. - ~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt b/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt index 76bf9aec947..1801bd42e4d 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt @@ -29,13 +29,13 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWit c.foo(1); var b = { - foo(x = 1), + foo(x = 1), // error ~ !!! error TS1005: '{' expected. ~~~ !!! error TS2300: Duplicate identifier 'foo'. - foo(x = 1) { }, - ~~~~~~~~~~~~~~ + foo(x = 1) { }, // error + ~~~ !!! error TS2300: Duplicate identifier 'foo'. } diff --git a/tests/baselines/reference/class1.errors.txt b/tests/baselines/reference/class1.errors.txt index 13602645c45..b90fae9cb40 100644 --- a/tests/baselines/reference/class1.errors.txt +++ b/tests/baselines/reference/class1.errors.txt @@ -3,9 +3,9 @@ tests/cases/compiler/class1.ts(2,7): error TS2300: Duplicate identifier 'foo'. ==== tests/cases/compiler/class1.ts (2 errors) ==== - interface foo{ } + interface foo{ } // error ~~~ !!! error TS2300: Duplicate identifier 'foo'. - class foo{ } + class foo{ } // error ~~~ !!! error TS2300: Duplicate identifier 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/class1.js b/tests/baselines/reference/class1.js index 96b279e58c6..7a104e237b6 100644 --- a/tests/baselines/reference/class1.js +++ b/tests/baselines/reference/class1.js @@ -1,10 +1,10 @@ //// [class1.ts] -interface foo{ } -class foo{ } +interface foo{ } // error +class foo{ } // error //// [class1.js] var foo = (function () { function foo() { } return foo; -})(); +})(); // error diff --git a/tests/baselines/reference/classAndInterface1.errors.txt b/tests/baselines/reference/classAndInterface1.errors.txt index a7a1b028d82..8d31e847d71 100644 --- a/tests/baselines/reference/classAndInterface1.errors.txt +++ b/tests/baselines/reference/classAndInterface1.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/classAndInterface1.ts(1,7): error TS2300: Duplicate identifier 'cli'. +tests/cases/compiler/classAndInterface1.ts(1,8): error TS2300: Duplicate identifier 'cli'. tests/cases/compiler/classAndInterface1.ts(2,11): error TS2300: Duplicate identifier 'cli'. ==== tests/cases/compiler/classAndInterface1.ts (2 errors) ==== - class cli { } - ~~~ + class cli { } // error + ~~~ !!! error TS2300: Duplicate identifier 'cli'. interface cli { } // error ~~~ diff --git a/tests/baselines/reference/classAndInterface1.js b/tests/baselines/reference/classAndInterface1.js index 74eec3e942e..5efabded838 100644 --- a/tests/baselines/reference/classAndInterface1.js +++ b/tests/baselines/reference/classAndInterface1.js @@ -1,5 +1,5 @@ //// [classAndInterface1.ts] -class cli { } + class cli { } // error interface cli { } // error //// [classAndInterface1.js] @@ -7,4 +7,4 @@ var cli = (function () { function cli() { } return cli; -})(); +})(); // error diff --git a/tests/baselines/reference/classAndVariableWithSameName.errors.txt b/tests/baselines/reference/classAndVariableWithSameName.errors.txt index 909ea253926..2e8c16d4494 100644 --- a/tests/baselines/reference/classAndVariableWithSameName.errors.txt +++ b/tests/baselines/reference/classAndVariableWithSameName.errors.txt @@ -5,7 +5,7 @@ tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.t ==== tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.ts (4 errors) ==== - class C { foo: string; } + class C { foo: string; } // error ~ !!! error TS2300: Duplicate identifier 'C'. var C = ''; // error @@ -13,7 +13,7 @@ tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.t !!! error TS2300: Duplicate identifier 'C'. module M { - class D { + class D { // error ~ !!! error TS2300: Duplicate identifier 'D'. bar: string; diff --git a/tests/baselines/reference/classAndVariableWithSameName.js b/tests/baselines/reference/classAndVariableWithSameName.js index ab17905d5b2..1d547dc5508 100644 --- a/tests/baselines/reference/classAndVariableWithSameName.js +++ b/tests/baselines/reference/classAndVariableWithSameName.js @@ -1,9 +1,9 @@ //// [classAndVariableWithSameName.ts] -class C { foo: string; } +class C { foo: string; } // error var C = ''; // error module M { - class D { + class D { // error bar: string; } @@ -15,7 +15,7 @@ var C = (function () { function C() { } return C; -})(); +})(); // error var C = ''; // error var M; (function (M) { diff --git a/tests/baselines/reference/classOverloadForFunction.errors.txt b/tests/baselines/reference/classOverloadForFunction.errors.txt index c52da033a2c..14bc27fb5ca 100644 --- a/tests/baselines/reference/classOverloadForFunction.errors.txt +++ b/tests/baselines/reference/classOverloadForFunction.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/classOverloadForFunction.ts(1,7): error TS2300: Duplicate identifier 'foo'. -tests/cases/compiler/classOverloadForFunction.ts(2,1): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/classOverloadForFunction.ts(2,10): error TS2300: Duplicate identifier 'foo'. ==== tests/cases/compiler/classOverloadForFunction.ts (2 errors) ==== @@ -7,6 +7,6 @@ tests/cases/compiler/classOverloadForFunction.ts(2,1): error TS2300: Duplicate i ~~~ !!! error TS2300: Duplicate identifier 'foo'. function foo() {} - ~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/classWithTwoConstructorDefinitions.errors.txt b/tests/baselines/reference/classWithTwoConstructorDefinitions.errors.txt index fa093b91c2d..6b08be330a0 100644 --- a/tests/baselines/reference/classWithTwoConstructorDefinitions.errors.txt +++ b/tests/baselines/reference/classWithTwoConstructorDefinitions.errors.txt @@ -6,7 +6,7 @@ tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorD ==== tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorDefinitions.ts (4 errors) ==== class C { - constructor() { } + constructor() { } // error ~~~~~~~~~~~~~~~~~ !!! error TS2392: Multiple constructor implementations are not allowed. constructor(x) { } // error @@ -15,7 +15,7 @@ tests/cases/conformance/classes/constructorDeclarations/classWithTwoConstructorD } class D { - constructor(x: T) { } + constructor(x: T) { } // error ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2392: Multiple constructor implementations are not allowed. constructor(x: T, y: T) { } // error diff --git a/tests/baselines/reference/classWithTwoConstructorDefinitions.js b/tests/baselines/reference/classWithTwoConstructorDefinitions.js index 77c98697f1f..31e5498cfc9 100644 --- a/tests/baselines/reference/classWithTwoConstructorDefinitions.js +++ b/tests/baselines/reference/classWithTwoConstructorDefinitions.js @@ -1,22 +1,22 @@ //// [classWithTwoConstructorDefinitions.ts] class C { - constructor() { } + constructor() { } // error constructor(x) { } // error } class D { - constructor(x: T) { } + constructor(x: T) { } // error constructor(x: T, y: T) { } // error } //// [classWithTwoConstructorDefinitions.js] var C = (function () { function C() { - } + } // error return C; })(); var D = (function () { function D(x) { - } + } // error return D; })(); diff --git a/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt b/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt index 901affa2554..914088f6c19 100644 --- a/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt +++ b/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt @@ -3,8 +3,8 @@ tests/cases/compiler/cloduleWithDuplicateMember1.ts(3,16): error TS1056: Accesso tests/cases/compiler/cloduleWithDuplicateMember1.ts(3,16): error TS2300: Duplicate identifier 'x'. tests/cases/compiler/cloduleWithDuplicateMember1.ts(6,12): error TS2300: Duplicate identifier 'foo'. tests/cases/compiler/cloduleWithDuplicateMember1.ts(10,16): error TS2300: Duplicate identifier 'x'. -tests/cases/compiler/cloduleWithDuplicateMember1.ts(13,5): error TS2300: Duplicate identifier 'foo'. -tests/cases/compiler/cloduleWithDuplicateMember1.ts(14,5): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/cloduleWithDuplicateMember1.ts(13,21): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/cloduleWithDuplicateMember1.ts(14,21): error TS2300: Duplicate identifier 'x'. ==== tests/cases/compiler/cloduleWithDuplicateMember1.ts (7 errors) ==== @@ -31,9 +31,9 @@ tests/cases/compiler/cloduleWithDuplicateMember1.ts(14,5): error TS2300: Duplica } module C { export function foo() { } - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'foo'. export function x() { } - ~~~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt b/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt index d8702a546d0..55d2fdbddf2 100644 --- a/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt +++ b/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/cloduleWithDuplicateMember2.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/cloduleWithDuplicateMember2.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/cloduleWithDuplicateMember2.ts(7,16): error TS2300: Duplicate identifier 'x'. -tests/cases/compiler/cloduleWithDuplicateMember2.ts(10,5): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/cloduleWithDuplicateMember2.ts(10,21): error TS2300: Duplicate identifier 'x'. ==== tests/cases/compiler/cloduleWithDuplicateMember2.ts (4 errors) ==== @@ -21,6 +21,6 @@ tests/cases/compiler/cloduleWithDuplicateMember2.ts(10,5): error TS2300: Duplica } module C { export function x() { } - ~~~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/conflictingTypeAnnotatedVar.errors.txt b/tests/baselines/reference/conflictingTypeAnnotatedVar.errors.txt index 080167cd760..0b667108b5f 100644 --- a/tests/baselines/reference/conflictingTypeAnnotatedVar.errors.txt +++ b/tests/baselines/reference/conflictingTypeAnnotatedVar.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/conflictingTypeAnnotatedVar.ts(1,5): error TS2300: Duplicate identifier 'foo'. -tests/cases/compiler/conflictingTypeAnnotatedVar.ts(2,1): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/conflictingTypeAnnotatedVar.ts(2,10): error TS2300: Duplicate identifier 'foo'. tests/cases/compiler/conflictingTypeAnnotatedVar.ts(2,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. -tests/cases/compiler/conflictingTypeAnnotatedVar.ts(3,1): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/conflictingTypeAnnotatedVar.ts(3,10): error TS2300: Duplicate identifier 'foo'. tests/cases/compiler/conflictingTypeAnnotatedVar.ts(3,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. @@ -10,12 +10,12 @@ tests/cases/compiler/conflictingTypeAnnotatedVar.ts(3,17): error TS2355: A funct ~~~ !!! error TS2300: Duplicate identifier 'foo'. function foo(): number { } - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'foo'. ~~~~~~ !!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. function foo(): number { } - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'foo'. ~~~~~~ !!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. \ No newline at end of file diff --git a/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt b/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt index e3d17237f1d..e12f3a59ca1 100644 --- a/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt +++ b/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt @@ -2,11 +2,11 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatur tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(4,24): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(4,27): error TS2369: A parameter property is only allowed in a constructor implementation. tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(4,35): error TS2300: Duplicate identifier 'y'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(5,17): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(5,27): error TS2300: Duplicate identifier 'y'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(5,24): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(5,35): error TS2300: Duplicate identifier 'y'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(9,17): error TS2369: A parameter property is only allowed in a constructor implementation. tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(9,25): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(10,17): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(10,24): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(14,17): error TS2369: A parameter property is only allowed in a constructor implementation. tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(19,10): error TS2369: A parameter property is only allowed in a constructor implementation. tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(20,10): error TS2369: A parameter property is only allowed in a constructor implementation. @@ -32,9 +32,9 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatur ~ !!! error TS2300: Duplicate identifier 'y'. constructor(public x, private y) { } - ~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. - ~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'y'. } @@ -45,7 +45,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatur ~ !!! error TS2300: Duplicate identifier 'x'. constructor(public x) { } - ~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } diff --git a/tests/baselines/reference/constructorOverloads4.errors.txt b/tests/baselines/reference/constructorOverloads4.errors.txt index 31c82ed5237..d2cc5ecd65b 100644 --- a/tests/baselines/reference/constructorOverloads4.errors.txt +++ b/tests/baselines/reference/constructorOverloads4.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/constructorOverloads4.ts(2,18): error TS2300: Duplicate identifier 'Function'. -tests/cases/compiler/constructorOverloads4.ts(5,5): error TS2300: Duplicate identifier 'Function'. -tests/cases/compiler/constructorOverloads4.ts(6,5): error TS2300: Duplicate identifier 'Function'. +tests/cases/compiler/constructorOverloads4.ts(5,21): error TS2300: Duplicate identifier 'Function'. +tests/cases/compiler/constructorOverloads4.ts(6,21): error TS2300: Duplicate identifier 'Function'. tests/cases/compiler/constructorOverloads4.ts(10,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. tests/cases/compiler/constructorOverloads4.ts(11,1): error TS2348: Value of type 'typeof Function' is not callable. Did you mean to include 'new'? @@ -13,10 +13,10 @@ tests/cases/compiler/constructorOverloads4.ts(11,1): error TS2348: Value of type constructor(...args: string[]); } export function Function(...args: any[]): any; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2300: Duplicate identifier 'Function'. export function Function(...args: string[]): Function; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~ !!! error TS2300: Duplicate identifier 'Function'. } diff --git a/tests/baselines/reference/constructorOverloads7.errors.txt b/tests/baselines/reference/constructorOverloads7.errors.txt index b7ad6d427b8..e3409dbb399 100644 --- a/tests/baselines/reference/constructorOverloads7.errors.txt +++ b/tests/baselines/reference/constructorOverloads7.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/constructorOverloads7.ts(1,15): error TS2300: Duplicate identifier 'Point'. -tests/cases/compiler/constructorOverloads7.ts(15,1): error TS2300: Duplicate identifier 'Point'. +tests/cases/compiler/constructorOverloads7.ts(15,10): error TS2300: Duplicate identifier 'Point'. tests/cases/compiler/constructorOverloads7.ts(22,18): error TS2384: Overload signatures must all be ambient or non-ambient. @@ -21,18 +21,13 @@ tests/cases/compiler/constructorOverloads7.ts(22,18): error TS2384: Overload sig // Because Point is a constructor function, this is inferred // to be Point and return type is inferred to be void function Point(x, y) { - ~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~ +!!! error TS2300: Duplicate identifier 'Point'. this.x = x; - ~~~~~~~~~~~~~~~ this.y = y; - ~~~~~~~~~~~~~~~ - return this; - ~~~~~~~~~~~~~~~~ } - ~ -!!! error TS2300: Duplicate identifier 'Point'. declare function EF1(a:number, b:number):number; ~~~ diff --git a/tests/baselines/reference/constructorParameterProperties2.errors.txt b/tests/baselines/reference/constructorParameterProperties2.errors.txt index 8a51ad82682..42df015bc5b 100644 --- a/tests/baselines/reference/constructorParameterProperties2.errors.txt +++ b/tests/baselines/reference/constructorParameterProperties2.errors.txt @@ -1,9 +1,9 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(10,5): error TS2300: Duplicate identifier 'y'. -tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(11,17): error TS2300: Duplicate identifier 'y'. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(11,24): error TS2300: Duplicate identifier 'y'. tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(18,5): error TS2300: Duplicate identifier 'y'. -tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(19,17): error TS2300: Duplicate identifier 'y'. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(19,25): error TS2300: Duplicate identifier 'y'. tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(26,5): error TS2300: Duplicate identifier 'y'. -tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(27,17): error TS2300: Duplicate identifier 'y'. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(27,27): error TS2300: Duplicate identifier 'y'. ==== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts (6 errors) ==== @@ -20,7 +20,7 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co ~ !!! error TS2300: Duplicate identifier 'y'. constructor(public y: number) { } // error - ~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'y'. } @@ -32,7 +32,7 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co ~ !!! error TS2300: Duplicate identifier 'y'. constructor(private y: number) { } // error - ~~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'y'. } @@ -44,7 +44,7 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co ~ !!! error TS2300: Duplicate identifier 'y'. constructor(protected y: number) { } // error - ~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'y'. } diff --git a/tests/baselines/reference/contextualTyping.errors.txt b/tests/baselines/reference/contextualTyping.errors.txt index 630da5a903d..ed6e50c1dbd 100644 --- a/tests/baselines/reference/contextualTyping.errors.txt +++ b/tests/baselines/reference/contextualTyping.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/contextualTyping.ts(189,18): error TS2384: Overload signatures must all be ambient or non-ambient. tests/cases/compiler/contextualTyping.ts(197,15): error TS2300: Duplicate identifier 'Point'. -tests/cases/compiler/contextualTyping.ts(207,1): error TS2300: Duplicate identifier 'Point'. +tests/cases/compiler/contextualTyping.ts(207,10): error TS2300: Duplicate identifier 'Point'. tests/cases/compiler/contextualTyping.ts(230,5): error TS2322: Type '{}' is not assignable to type 'B':\n Property 'x' is missing in type '{}'. @@ -216,18 +216,13 @@ tests/cases/compiler/contextualTyping.ts(230,5): error TS2322: Type '{}' is not } function Point(x, y) { - ~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~ +!!! error TS2300: Duplicate identifier 'Point'. this.x = x; - ~~~~~~~~~~~~~~~ this.y = y; - ~~~~~~~~~~~~~~~ - return this; - ~~~~~~~~~~~~~~~~ } - ~ -!!! error TS2300: Duplicate identifier 'Point'. Point.origin = new Point(0, 0); diff --git a/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt b/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt index dcbde21e670..7212121e106 100644 --- a/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt +++ b/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt @@ -54,6 +54,6 @@ tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceIncompa interface Derived5 extends Base { '1': { x: number } // error - ~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier ''1''. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateClassElements.errors.txt b/tests/baselines/reference/duplicateClassElements.errors.txt index ee9fb937004..004e68314fd 100644 --- a/tests/baselines/reference/duplicateClassElements.errors.txt +++ b/tests/baselines/reference/duplicateClassElements.errors.txt @@ -9,21 +9,21 @@ tests/cases/compiler/duplicateClassElements.ts(32,9): error TS1056: Accessors ar tests/cases/compiler/duplicateClassElements.ts(36,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/duplicateClassElements.ts(39,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/duplicateClassElements.ts(2,12): error TS2300: Duplicate identifier 'a'. -tests/cases/compiler/duplicateClassElements.ts(3,5): error TS2300: Duplicate identifier 'a'. -tests/cases/compiler/duplicateClassElements.ts(4,5): error TS2393: Duplicate function implementation. -tests/cases/compiler/duplicateClassElements.ts(6,5): error TS2393: Duplicate function implementation. +tests/cases/compiler/duplicateClassElements.ts(3,12): error TS2300: Duplicate identifier 'a'. +tests/cases/compiler/duplicateClassElements.ts(4,12): error TS2393: Duplicate function implementation. +tests/cases/compiler/duplicateClassElements.ts(6,12): error TS2393: Duplicate function implementation. tests/cases/compiler/duplicateClassElements.ts(8,12): error TS2300: Duplicate identifier 'x'. -tests/cases/compiler/duplicateClassElements.ts(9,5): error TS2300: Duplicate identifier 'x'. -tests/cases/compiler/duplicateClassElements.ts(12,5): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/duplicateClassElements.ts(9,9): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/duplicateClassElements.ts(12,9): error TS2300: Duplicate identifier 'x'. tests/cases/compiler/duplicateClassElements.ts(21,12): error TS2300: Duplicate identifier 'z'. -tests/cases/compiler/duplicateClassElements.ts(23,5): error TS2300: Duplicate identifier 'z'. -tests/cases/compiler/duplicateClassElements.ts(26,5): error TS2300: Duplicate identifier 'z'. +tests/cases/compiler/duplicateClassElements.ts(23,9): error TS2300: Duplicate identifier 'z'. +tests/cases/compiler/duplicateClassElements.ts(26,9): error TS2300: Duplicate identifier 'z'. tests/cases/compiler/duplicateClassElements.ts(29,9): error TS2300: Duplicate identifier 'x2'. tests/cases/compiler/duplicateClassElements.ts(32,9): error TS2300: Duplicate identifier 'x2'. -tests/cases/compiler/duplicateClassElements.ts(34,5): error TS2300: Duplicate identifier 'x2'. +tests/cases/compiler/duplicateClassElements.ts(34,12): error TS2300: Duplicate identifier 'x2'. tests/cases/compiler/duplicateClassElements.ts(36,9): error TS2300: Duplicate identifier 'z2'. tests/cases/compiler/duplicateClassElements.ts(39,9): error TS2300: Duplicate identifier 'z2'. -tests/cases/compiler/duplicateClassElements.ts(41,5): error TS2300: Duplicate identifier 'z2'. +tests/cases/compiler/duplicateClassElements.ts(41,12): error TS2300: Duplicate identifier 'z2'. ==== tests/cases/compiler/duplicateClassElements.ts (26 errors) ==== @@ -32,37 +32,32 @@ tests/cases/compiler/duplicateClassElements.ts(41,5): error TS2300: Duplicate id ~ !!! error TS2300: Duplicate identifier 'a'. public a; - ~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'a'. public b() { - ~~~~~~~~~~~~ - } - ~~~~~ + ~ !!! error TS2393: Duplicate function implementation. + } public b() { - ~~~~~~~~~~~~ - } - ~~~~~ + ~ !!! error TS2393: Duplicate function implementation. + } public x; ~ !!! error TS2300: Duplicate identifier 'x'. get x() { ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~ - return 10; - ~~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. + return 10; + } set x(_x: number) { ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. + } get y() { ~ @@ -81,19 +76,16 @@ tests/cases/compiler/duplicateClassElements.ts(41,5): error TS2300: Duplicate id get z() { ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~ - return "Hello"; - ~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~ !!! error TS2300: Duplicate identifier 'z'. + return "Hello"; + } set z(_y: string) { ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~ !!! error TS2300: Duplicate identifier 'z'. + } get x2() { ~~ @@ -109,7 +101,7 @@ tests/cases/compiler/duplicateClassElements.ts(41,5): error TS2300: Duplicate id !!! error TS2300: Duplicate identifier 'x2'. } public x2; - ~~~~~~~~~~ + ~~ !!! error TS2300: Duplicate identifier 'x2'. get z2() { @@ -126,9 +118,8 @@ tests/cases/compiler/duplicateClassElements.ts(41,5): error TS2300: Duplicate id !!! error TS2300: Duplicate identifier 'z2'. } public z2() { - ~~~~~~~~~~~~~ - } - ~~~~~ + ~~ !!! error TS2300: Duplicate identifier 'z2'. + } } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateIdentifierInCatchBlock.errors.txt b/tests/baselines/reference/duplicateIdentifierInCatchBlock.errors.txt index 7c43bc81289..d8065df27c8 100644 --- a/tests/baselines/reference/duplicateIdentifierInCatchBlock.errors.txt +++ b/tests/baselines/reference/duplicateIdentifierInCatchBlock.errors.txt @@ -1,9 +1,9 @@ tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(1,5): error TS2300: Duplicate identifier 'v'. -tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(3,5): error TS2300: Duplicate identifier 'v'. +tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(3,14): error TS2300: Duplicate identifier 'v'. tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(6,10): error TS2300: Duplicate identifier 'w'. tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(8,9): error TS2300: Duplicate identifier 'w'. tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(12,9): error TS2300: Duplicate identifier 'x'. -tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(13,5): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(13,14): error TS2300: Duplicate identifier 'x'. tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(16,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'string', but here has type 'number'. @@ -13,7 +13,7 @@ tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(16,9): error TS2403: Sub !!! error TS2300: Duplicate identifier 'v'. try { } catch (e) { function v() { } - ~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'v'. } @@ -31,7 +31,7 @@ tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(16,9): error TS2403: Sub ~ !!! error TS2300: Duplicate identifier 'x'. function x() { } // error - ~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. function e() { } // error var p: string; diff --git a/tests/baselines/reference/duplicateInterfaceMembers1.errors.txt b/tests/baselines/reference/duplicateInterfaceMembers1.errors.txt index 5920064dd99..674d4f601e6 100644 --- a/tests/baselines/reference/duplicateInterfaceMembers1.errors.txt +++ b/tests/baselines/reference/duplicateInterfaceMembers1.errors.txt @@ -8,7 +8,7 @@ tests/cases/compiler/duplicateInterfaceMembers1.ts(3,4): error TS2300: Duplicate ~ !!! error TS2300: Duplicate identifier 'x'. x: number; - ~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateObjectLiteralProperty.errors.txt b/tests/baselines/reference/duplicateObjectLiteralProperty.errors.txt index 6ea3a636ab8..4c3f6d1eb7e 100644 --- a/tests/baselines/reference/duplicateObjectLiteralProperty.errors.txt +++ b/tests/baselines/reference/duplicateObjectLiteralProperty.errors.txt @@ -10,7 +10,7 @@ tests/cases/compiler/duplicateObjectLiteralProperty.ts(7,9): error TS2300: Dupli tests/cases/compiler/duplicateObjectLiteralProperty.ts(8,9): error TS2300: Duplicate identifier '"c"'. tests/cases/compiler/duplicateObjectLiteralProperty.ts(14,9): error TS2300: Duplicate identifier 'a'. tests/cases/compiler/duplicateObjectLiteralProperty.ts(15,9): error TS2300: Duplicate identifier 'a'. -tests/cases/compiler/duplicateObjectLiteralProperty.ts(16,5): error TS2300: Duplicate identifier 'a'. +tests/cases/compiler/duplicateObjectLiteralProperty.ts(16,9): error TS2300: Duplicate identifier 'a'. ==== tests/cases/compiler/duplicateObjectLiteralProperty.ts (13 errors) ==== @@ -20,24 +20,21 @@ tests/cases/compiler/duplicateObjectLiteralProperty.ts(16,5): error TS2300: Dupl !!! error TS2300: Duplicate identifier 'a'. b: true, // OK a: 56, // Duplicate - ~~~~~ + ~ !!! error TS2300: Duplicate identifier 'a'. \u0061: "ss", // Duplicate - ~~~~~~~~~~~~ + ~~~~~~ !!! error TS2300: Duplicate identifier '\u0061'. a: { - ~~~~ + ~ +!!! error TS2300: Duplicate identifier 'a'. c: 1, - ~~~~~~~~~~~~~ ~ !!! error TS2300: Duplicate identifier 'c'. "c": 56, // Duplicate - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier '"c"'. } - ~~~~~ -!!! error TS2300: Duplicate identifier 'a'. }; @@ -57,7 +54,7 @@ tests/cases/compiler/duplicateObjectLiteralProperty.ts(16,5): error TS2300: Dupl !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ !!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. - ~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'a'. }; \ No newline at end of file diff --git a/tests/baselines/reference/duplicatePropertiesInStrictMode.errors.txt b/tests/baselines/reference/duplicatePropertiesInStrictMode.errors.txt index 50b29eff93a..6ae8518677d 100644 --- a/tests/baselines/reference/duplicatePropertiesInStrictMode.errors.txt +++ b/tests/baselines/reference/duplicatePropertiesInStrictMode.errors.txt @@ -12,6 +12,6 @@ tests/cases/compiler/duplicatePropertiesInStrictMode.ts(4,3): error TS2300: Dupl x: 2 ~ !!! error TS1117: An object literal cannot have multiple properties with the same name in strict mode. - ~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicatePropertyNames.errors.txt b/tests/baselines/reference/duplicatePropertyNames.errors.txt index 6ed93382aef..108a88d1451 100644 --- a/tests/baselines/reference/duplicatePropertyNames.errors.txt +++ b/tests/baselines/reference/duplicatePropertyNames.errors.txt @@ -28,7 +28,7 @@ tests/cases/conformance/types/members/duplicatePropertyNames.ts(46,5): error TS2 ~~~ !!! error TS2300: Duplicate identifier 'foo'. foo: string; - ~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'foo'. } @@ -42,7 +42,7 @@ tests/cases/conformance/types/members/duplicatePropertyNames.ts(46,5): error TS2 ~~~ !!! error TS2300: Duplicate identifier 'foo'. foo: T; - ~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'foo'. } @@ -51,21 +51,21 @@ tests/cases/conformance/types/members/duplicatePropertyNames.ts(46,5): error TS2 ~~~ !!! error TS2300: Duplicate identifier 'foo'. foo: string; - ~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'foo'. bar(x) { } - ~~~~~~~~~~ + ~~~ !!! error TS2393: Duplicate function implementation. bar(x) { } - ~~~~~~~~~~ + ~~~ !!! error TS2393: Duplicate function implementation. baz = () => { } ~~~ !!! error TS2300: Duplicate identifier 'baz'. baz = () => { } - ~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'baz'. } @@ -74,7 +74,7 @@ tests/cases/conformance/types/members/duplicatePropertyNames.ts(46,5): error TS2 ~~~ !!! error TS2300: Duplicate identifier 'foo'. foo: string; - ~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'foo'. } @@ -83,14 +83,14 @@ tests/cases/conformance/types/members/duplicatePropertyNames.ts(46,5): error TS2 ~~~ !!! error TS2300: Duplicate identifier 'foo'. foo: string; - ~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'foo'. bar: () => {}; ~~~ !!! error TS2300: Duplicate identifier 'bar'. bar: () => {}; - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'bar'. } @@ -99,13 +99,13 @@ tests/cases/conformance/types/members/duplicatePropertyNames.ts(46,5): error TS2 ~~~ !!! error TS2300: Duplicate identifier 'foo'. foo: '', - ~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'foo'. bar: () => { }, ~~~ !!! error TS2300: Duplicate identifier 'bar'. bar: () => { } - ~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'bar'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateStringNamedProperty1.errors.txt b/tests/baselines/reference/duplicateStringNamedProperty1.errors.txt index 38652e37f10..7d6c5d6bafc 100644 --- a/tests/baselines/reference/duplicateStringNamedProperty1.errors.txt +++ b/tests/baselines/reference/duplicateStringNamedProperty1.errors.txt @@ -8,6 +8,6 @@ tests/cases/compiler/duplicateStringNamedProperty1.ts(3,5): error TS2300: Duplic ~~~~~~~~ !!! error TS2300: Duplicate identifier '"artist"'. artist: string; - ~~~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2300: Duplicate identifier 'artist'. } \ No newline at end of file diff --git a/tests/baselines/reference/es6ClassTest9.errors.txt b/tests/baselines/reference/es6ClassTest9.errors.txt index d8af974a176..ae7d1ba92d5 100644 --- a/tests/baselines/reference/es6ClassTest9.errors.txt +++ b/tests/baselines/reference/es6ClassTest9.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/es6ClassTest9.ts(1,18): error TS1005: '{' expected. tests/cases/compiler/es6ClassTest9.ts(1,19): error TS1109: Expression expected. tests/cases/compiler/es6ClassTest9.ts(1,15): error TS2300: Duplicate identifier 'foo'. -tests/cases/compiler/es6ClassTest9.ts(2,1): error TS2300: Duplicate identifier 'foo'. +tests/cases/compiler/es6ClassTest9.ts(2,10): error TS2300: Duplicate identifier 'foo'. ==== tests/cases/compiler/es6ClassTest9.ts (4 errors) ==== @@ -13,6 +13,6 @@ tests/cases/compiler/es6ClassTest9.ts(2,1): error TS2300: Duplicate identifier ' ~~~ !!! error TS2300: Duplicate identifier 'foo'. function foo() {} - ~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/exportSameNameFuncVar.errors.txt b/tests/baselines/reference/exportSameNameFuncVar.errors.txt index 4d6d835b13b..a06457e88ae 100644 --- a/tests/baselines/reference/exportSameNameFuncVar.errors.txt +++ b/tests/baselines/reference/exportSameNameFuncVar.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/exportSameNameFuncVar.ts(1,12): error TS2300: Duplicate identifier 'a'. -tests/cases/compiler/exportSameNameFuncVar.ts(2,1): error TS2300: Duplicate identifier 'a'. +tests/cases/compiler/exportSameNameFuncVar.ts(2,17): error TS2300: Duplicate identifier 'a'. ==== tests/cases/compiler/exportSameNameFuncVar.ts (2 errors) ==== @@ -7,7 +7,6 @@ tests/cases/compiler/exportSameNameFuncVar.ts(2,1): error TS2300: Duplicate iden ~ !!! error TS2300: Duplicate identifier 'a'. export function a() { - ~~~~~~~~~~~~~~~~~~~~~ - } - ~ -!!! error TS2300: Duplicate identifier 'a'. \ No newline at end of file + ~ +!!! error TS2300: Duplicate identifier 'a'. + } \ No newline at end of file diff --git a/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt b/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt index 34b6ea08e09..dd2374f2447 100644 --- a/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt +++ b/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/fieldAndGetterWithSameName.ts(3,7): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/fieldAndGetterWithSameName.ts(2,5): error TS2300: Duplicate identifier 'x'. -tests/cases/compiler/fieldAndGetterWithSameName.ts(3,3): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/fieldAndGetterWithSameName.ts(3,7): error TS2300: Duplicate identifier 'x'. ==== tests/cases/compiler/fieldAndGetterWithSameName.ts (3 errors) ==== @@ -11,6 +11,6 @@ tests/cases/compiler/fieldAndGetterWithSameName.ts(3,3): error TS2300: Duplicate get x(): number { return 1; } ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/funClodule.errors.txt b/tests/baselines/reference/funClodule.errors.txt index 9a4f6c27224..72a9ed0db51 100644 --- a/tests/baselines/reference/funClodule.errors.txt +++ b/tests/baselines/reference/funClodule.errors.txt @@ -3,7 +3,7 @@ tests/cases/compiler/funClodule.ts(2,16): error TS2300: Duplicate identifier 'fo tests/cases/compiler/funClodule.ts(5,15): error TS2300: Duplicate identifier 'foo'. tests/cases/compiler/funClodule.ts(8,15): error TS2300: Duplicate identifier 'foo2'. tests/cases/compiler/funClodule.ts(9,16): error TS2300: Duplicate identifier 'foo2'. -tests/cases/compiler/funClodule.ts(12,1): error TS2300: Duplicate identifier 'foo2'. +tests/cases/compiler/funClodule.ts(12,18): error TS2300: Duplicate identifier 'foo2'. tests/cases/compiler/funClodule.ts(15,10): error TS2300: Duplicate identifier 'foo3'. tests/cases/compiler/funClodule.ts(16,8): error TS2300: Duplicate identifier 'foo3'. tests/cases/compiler/funClodule.ts(19,7): error TS2300: Duplicate identifier 'foo3'. @@ -32,7 +32,7 @@ tests/cases/compiler/funClodule.ts(19,7): error TS2300: Duplicate identifier 'fo export function x(): any; } declare function foo2(); // Should error - ~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~ !!! error TS2300: Duplicate identifier 'foo2'. diff --git a/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt b/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt index 1e246184fb1..640844064c4 100644 --- a/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt +++ b/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/functionAndPropertyNameConflict.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/functionAndPropertyNameConflict.ts(2,12): error TS2300: Duplicate identifier 'aaaaa'. -tests/cases/compiler/functionAndPropertyNameConflict.ts(3,5): error TS2300: Duplicate identifier 'aaaaa'. +tests/cases/compiler/functionAndPropertyNameConflict.ts(3,16): error TS2300: Duplicate identifier 'aaaaa'. ==== tests/cases/compiler/functionAndPropertyNameConflict.ts (3 errors) ==== @@ -11,10 +11,8 @@ tests/cases/compiler/functionAndPropertyNameConflict.ts(3,5): error TS2300: Dupl public get aaaaa() { ~~~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~~~~ - return 1; - ~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~~~~~ !!! error TS2300: Duplicate identifier 'aaaaa'. + return 1; + } } \ No newline at end of file diff --git a/tests/baselines/reference/functionCall15.errors.txt b/tests/baselines/reference/functionCall15.errors.txt index 3d170c34fa0..4b6acf34e14 100644 --- a/tests/baselines/reference/functionCall15.errors.txt +++ b/tests/baselines/reference/functionCall15.errors.txt @@ -1,10 +1,10 @@ tests/cases/compiler/functionCall15.ts(1,25): error TS2300: Duplicate identifier 'b'. -tests/cases/compiler/functionCall15.ts(1,36): error TS2300: Duplicate identifier 'b'. +tests/cases/compiler/functionCall15.ts(1,39): error TS2300: Duplicate identifier 'b'. ==== tests/cases/compiler/functionCall15.ts (2 errors) ==== function foo(a?:string, b?:number, ...b:number[]){} ~ !!! error TS2300: Duplicate identifier 'b'. - ~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'b'. \ No newline at end of file diff --git a/tests/baselines/reference/functionNameConflicts.errors.txt b/tests/baselines/reference/functionNameConflicts.errors.txt index cf37103eed5..86fa348d817 100644 --- a/tests/baselines/reference/functionNameConflicts.errors.txt +++ b/tests/baselines/reference/functionNameConflicts.errors.txt @@ -1,11 +1,11 @@ tests/cases/conformance/functions/functionNameConflicts.ts(5,14): error TS2300: Duplicate identifier 'fn1'. tests/cases/conformance/functions/functionNameConflicts.ts(6,9): error TS2300: Duplicate identifier 'fn1'. tests/cases/conformance/functions/functionNameConflicts.ts(8,9): error TS2300: Duplicate identifier 'fn2'. -tests/cases/conformance/functions/functionNameConflicts.ts(9,5): error TS2300: Duplicate identifier 'fn2'. +tests/cases/conformance/functions/functionNameConflicts.ts(9,14): error TS2300: Duplicate identifier 'fn2'. tests/cases/conformance/functions/functionNameConflicts.ts(12,10): error TS2300: Duplicate identifier 'fn3'. tests/cases/conformance/functions/functionNameConflicts.ts(13,5): error TS2300: Duplicate identifier 'fn3'. tests/cases/conformance/functions/functionNameConflicts.ts(16,9): error TS2300: Duplicate identifier 'fn4'. -tests/cases/conformance/functions/functionNameConflicts.ts(17,5): error TS2300: Duplicate identifier 'fn4'. +tests/cases/conformance/functions/functionNameConflicts.ts(17,14): error TS2300: Duplicate identifier 'fn4'. tests/cases/conformance/functions/functionNameConflicts.ts(19,14): error TS2300: Duplicate identifier 'fn5'. tests/cases/conformance/functions/functionNameConflicts.ts(20,9): error TS2300: Duplicate identifier 'fn5'. tests/cases/conformance/functions/functionNameConflicts.ts(24,10): error TS2389: Function implementation name must be 'over'. @@ -27,7 +27,7 @@ tests/cases/conformance/functions/functionNameConflicts.ts(24,10): error TS2389: ~~~ !!! error TS2300: Duplicate identifier 'fn2'. function fn2() { } - ~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'fn2'. } @@ -43,7 +43,7 @@ tests/cases/conformance/functions/functionNameConflicts.ts(24,10): error TS2389: ~~~ !!! error TS2300: Duplicate identifier 'fn4'. function fn4() { } - ~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'fn4'. function fn5() { } diff --git a/tests/baselines/reference/functionWithSameNameAsField.errors.txt b/tests/baselines/reference/functionWithSameNameAsField.errors.txt index 4dd114c8872..168b9191df4 100644 --- a/tests/baselines/reference/functionWithSameNameAsField.errors.txt +++ b/tests/baselines/reference/functionWithSameNameAsField.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/functionWithSameNameAsField.ts(2,12): error TS2300: Duplicate identifier 'total'. -tests/cases/compiler/functionWithSameNameAsField.ts(3,5): error TS2300: Duplicate identifier 'total'. +tests/cases/compiler/functionWithSameNameAsField.ts(3,12): error TS2300: Duplicate identifier 'total'. ==== tests/cases/compiler/functionWithSameNameAsField.ts (2 errors) ==== @@ -8,13 +8,10 @@ tests/cases/compiler/functionWithSameNameAsField.ts(3,5): error TS2300: Duplicat ~~~~~ !!! error TS2300: Duplicate identifier 'total'. public total(total: number) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - this.total = total; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - return this; - ~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~~~~~ !!! error TS2300: Duplicate identifier 'total'. + this.total = total; + return this; + } } \ No newline at end of file diff --git a/tests/baselines/reference/gettersAndSettersErrors.errors.txt b/tests/baselines/reference/gettersAndSettersErrors.errors.txt index 1cc033cde04..95fb571d9b8 100644 --- a/tests/baselines/reference/gettersAndSettersErrors.errors.txt +++ b/tests/baselines/reference/gettersAndSettersErrors.errors.txt @@ -6,7 +6,7 @@ tests/cases/compiler/gettersAndSettersErrors.ts(11,17): error TS1056: Accessors tests/cases/compiler/gettersAndSettersErrors.ts(12,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/gettersAndSettersErrors.ts(2,16): error TS2300: Duplicate identifier 'Foo'. tests/cases/compiler/gettersAndSettersErrors.ts(3,16): error TS2300: Duplicate identifier 'Foo'. -tests/cases/compiler/gettersAndSettersErrors.ts(5,5): error TS2300: Duplicate identifier 'Foo'. +tests/cases/compiler/gettersAndSettersErrors.ts(5,12): error TS2300: Duplicate identifier 'Foo'. tests/cases/compiler/gettersAndSettersErrors.ts(11,17): error TS2379: Getter and setter accessors do not agree in visibility. tests/cases/compiler/gettersAndSettersErrors.ts(12,16): error TS2379: Getter and setter accessors do not agree in visibility. @@ -25,7 +25,7 @@ tests/cases/compiler/gettersAndSettersErrors.ts(12,16): error TS2379: Getter and !!! error TS2300: Duplicate identifier 'Foo'. public Foo = 0; // error - duplicate identifier Foo - confirmed - ~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'Foo'. public get Goo(v:string):string {return null;} // error - getters must not have a parameter ~~~ diff --git a/tests/baselines/reference/giant.errors.txt b/tests/baselines/reference/giant.errors.txt index 46e3632a938..5ef1393915d 100644 --- a/tests/baselines/reference/giant.errors.txt +++ b/tests/baselines/reference/giant.errors.txt @@ -146,137 +146,137 @@ tests/cases/compiler/giant.ts(672,25): error TS1036: Statements are not allowed tests/cases/compiler/giant.ts(676,30): error TS1037: A function implementation cannot be declared in an ambient context. tests/cases/compiler/giant.ts(676,33): error TS1036: Statements are not allowed in ambient contexts. tests/cases/compiler/giant.ts(23,12): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(24,5): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(24,16): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(24,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(25,12): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(26,5): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(26,16): error TS2300: Duplicate identifier 'psF'. tests/cases/compiler/giant.ts(27,13): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(28,5): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(28,17): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(28,17): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(29,13): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(30,5): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(30,17): error TS2300: Duplicate identifier 'rsF'. tests/cases/compiler/giant.ts(33,12): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(34,5): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(34,16): error TS2300: Duplicate identifier 'tsF'. tests/cases/compiler/giant.ts(35,12): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(36,5): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(36,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(36,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(76,5): error TS2386: Overload signatures must all be optional or required. tests/cases/compiler/giant.ts(87,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(88,9): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(88,20): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(88,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(89,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(90,9): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(90,20): error TS2300: Duplicate identifier 'psF'. tests/cases/compiler/giant.ts(91,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(92,9): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(92,21): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(92,21): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(93,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(94,9): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(94,21): error TS2300: Duplicate identifier 'rsF'. tests/cases/compiler/giant.ts(97,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(98,9): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(98,20): error TS2300: Duplicate identifier 'tsF'. tests/cases/compiler/giant.ts(99,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(100,9): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(100,20): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(100,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(140,9): error TS2386: Overload signatures must all be optional or required. tests/cases/compiler/giant.ts(166,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(167,9): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(167,20): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(167,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(168,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(169,9): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(169,20): error TS2300: Duplicate identifier 'psF'. tests/cases/compiler/giant.ts(170,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(171,9): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(171,21): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(171,21): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(172,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(173,9): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(173,21): error TS2300: Duplicate identifier 'rsF'. tests/cases/compiler/giant.ts(176,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(177,9): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(177,20): error TS2300: Duplicate identifier 'tsF'. tests/cases/compiler/giant.ts(178,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(179,9): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(179,20): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(179,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(219,9): error TS2386: Overload signatures must all be optional or required. tests/cases/compiler/giant.ts(245,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(246,9): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(246,20): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(247,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(248,9): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(248,20): error TS2300: Duplicate identifier 'psF'. tests/cases/compiler/giant.ts(249,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(250,9): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(250,21): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(251,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(252,9): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(252,21): error TS2300: Duplicate identifier 'rsF'. tests/cases/compiler/giant.ts(255,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(256,9): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(256,20): error TS2300: Duplicate identifier 'tsF'. tests/cases/compiler/giant.ts(257,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(258,9): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(258,20): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(281,12): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(282,5): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(282,16): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(282,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(283,12): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(284,5): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(284,16): error TS2300: Duplicate identifier 'psF'. tests/cases/compiler/giant.ts(285,13): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(286,5): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(286,17): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(286,17): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(287,13): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(288,5): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(288,17): error TS2300: Duplicate identifier 'rsF'. tests/cases/compiler/giant.ts(291,12): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(292,5): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(292,16): error TS2300: Duplicate identifier 'tsF'. tests/cases/compiler/giant.ts(293,12): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(294,5): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(294,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(294,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(334,5): error TS2386: Overload signatures must all be optional or required. tests/cases/compiler/giant.ts(345,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(346,9): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(346,20): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(346,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(347,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(348,9): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(348,20): error TS2300: Duplicate identifier 'psF'. tests/cases/compiler/giant.ts(349,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(350,9): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(350,21): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(350,21): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(351,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(352,9): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(352,21): error TS2300: Duplicate identifier 'rsF'. tests/cases/compiler/giant.ts(355,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(356,9): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(356,20): error TS2300: Duplicate identifier 'tsF'. tests/cases/compiler/giant.ts(357,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(358,9): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(358,20): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(358,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(398,9): error TS2386: Overload signatures must all be optional or required. tests/cases/compiler/giant.ts(424,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(425,9): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(425,20): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(425,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(426,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(427,9): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(427,20): error TS2300: Duplicate identifier 'psF'. tests/cases/compiler/giant.ts(428,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(429,9): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(429,21): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(429,21): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(430,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(431,9): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(431,21): error TS2300: Duplicate identifier 'rsF'. tests/cases/compiler/giant.ts(434,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(435,9): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(435,20): error TS2300: Duplicate identifier 'tsF'. tests/cases/compiler/giant.ts(436,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(437,9): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(437,20): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(437,20): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/compiler/giant.ts(477,9): error TS2386: Overload signatures must all be optional or required. tests/cases/compiler/giant.ts(503,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(504,9): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(504,20): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(505,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(506,9): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(506,20): error TS2300: Duplicate identifier 'psF'. tests/cases/compiler/giant.ts(507,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(508,9): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(508,21): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(509,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(510,9): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(510,21): error TS2300: Duplicate identifier 'rsF'. tests/cases/compiler/giant.ts(513,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(514,9): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(514,20): error TS2300: Duplicate identifier 'tsF'. tests/cases/compiler/giant.ts(515,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(516,9): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(516,20): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(539,12): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(540,5): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(540,16): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(541,12): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(542,5): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(542,16): error TS2300: Duplicate identifier 'psF'. tests/cases/compiler/giant.ts(543,13): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(544,5): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(544,17): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(545,13): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(546,5): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(546,17): error TS2300: Duplicate identifier 'rsF'. tests/cases/compiler/giant.ts(549,12): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(550,5): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(550,16): error TS2300: Duplicate identifier 'tsF'. tests/cases/compiler/giant.ts(551,12): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(552,5): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(552,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(602,9): error TS2386: Overload signatures must all be optional or required. tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all be optional or required. @@ -308,7 +308,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'pgF'. public get pgF() - ~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -318,7 +318,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ @@ -326,7 +326,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'rgF'. private get rgF() - ~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'rgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -336,7 +336,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ @@ -346,7 +346,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ @@ -354,7 +354,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'tgF'. static get tgF() - ~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -422,7 +422,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'pgF'. public get pgF() - ~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -432,7 +432,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ @@ -440,7 +440,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'rgF'. private get rgF() - ~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'rgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -450,7 +450,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ @@ -460,7 +460,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ @@ -468,7 +468,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'tgF'. static get tgF() - ~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -553,7 +553,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'pgF'. public get pgF() - ~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -563,7 +563,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ @@ -571,7 +571,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'rgF'. private get rgF() - ~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'rgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -581,7 +581,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ @@ -591,7 +591,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ @@ -599,7 +599,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'tgF'. static get tgF() - ~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -696,7 +696,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all public get pgF() ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'pgF'. public psF(param:any) { } ~ @@ -706,7 +706,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all public set psF(param:any) ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~ @@ -716,7 +716,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all private get rgF() ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'rgF'. private rsF(param:any) { } ~ @@ -726,7 +726,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all private set rsF(param:any) ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; static tF() { } @@ -740,7 +740,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all static set tsF(param:any) ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~ @@ -750,7 +750,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all static get tgF() ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'tgF'. } export declare module eaM { @@ -786,7 +786,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'pgF'. public get pgF() - ~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -796,7 +796,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ @@ -804,7 +804,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'rgF'. private get rgF() - ~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'rgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -814,7 +814,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ @@ -824,7 +824,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ @@ -832,7 +832,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'tgF'. static get tgF() - ~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -900,7 +900,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'pgF'. public get pgF() - ~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -910,7 +910,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ @@ -918,7 +918,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'rgF'. private get rgF() - ~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'rgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -928,7 +928,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ @@ -938,7 +938,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ @@ -946,7 +946,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'tgF'. static get tgF() - ~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -1031,7 +1031,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'pgF'. public get pgF() - ~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -1041,7 +1041,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ @@ -1049,7 +1049,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'rgF'. private get rgF() - ~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'rgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -1059,7 +1059,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ @@ -1069,7 +1069,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ @@ -1077,7 +1077,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all ~~~ !!! error TS2300: Duplicate identifier 'tgF'. static get tgF() - ~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. @@ -1174,7 +1174,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all public get pgF() ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'pgF'. public psF(param:any) { } ~ @@ -1184,7 +1184,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all public set psF(param:any) ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~ @@ -1194,7 +1194,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all private get rgF() ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'rgF'. private rsF(param:any) { } ~ @@ -1204,7 +1204,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all private set rsF(param:any) ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; static tF() { } @@ -1218,7 +1218,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all static set tsF(param:any) ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~ @@ -1228,7 +1228,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all static get tgF() ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'tgF'. } export declare module eaM { @@ -1276,7 +1276,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all public get pgF() ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'pgF'. public psF(param:any) { } ~ @@ -1286,7 +1286,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all public set psF(param:any) ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~ @@ -1296,7 +1296,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all private get rgF() ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'rgF'. private rsF(param:any) { } ~ @@ -1306,7 +1306,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all private set rsF(param:any) ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; static tF() { } @@ -1320,7 +1320,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all static set tsF(param:any) ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~ @@ -1330,7 +1330,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all static get tgF() ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'tgF'. } export declare module eaM { diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt b/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt index 3ddd9f7c409..39567a11753 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt +++ b/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/importAndVariableDeclarationConflict3.ts(5,8): error TS2300: Duplicate identifier 'x'. -tests/cases/compiler/importAndVariableDeclarationConflict3.ts(6,1): error TS2300: Duplicate identifier 'x'. +tests/cases/compiler/importAndVariableDeclarationConflict3.ts(6,8): error TS2300: Duplicate identifier 'x'. ==== tests/cases/compiler/importAndVariableDeclarationConflict3.ts (2 errors) ==== @@ -11,6 +11,6 @@ tests/cases/compiler/importAndVariableDeclarationConflict3.ts(6,1): error TS2300 ~ !!! error TS2300: Duplicate identifier 'x'. import x = m.m; - ~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceDeclaration1.errors.txt b/tests/baselines/reference/interfaceDeclaration1.errors.txt index 43cafecf578..3d7fcb86784 100644 --- a/tests/baselines/reference/interfaceDeclaration1.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration1.errors.txt @@ -16,7 +16,7 @@ tests/cases/compiler/interfaceDeclaration1.ts(52,11): error TS2320: Interface 'i ~~~~ !!! error TS2300: Duplicate identifier 'item'. item:number; - ~~~~~~~~~~~~ + ~~~~ !!! error TS2300: Duplicate identifier 'item'. } @@ -25,7 +25,7 @@ tests/cases/compiler/interfaceDeclaration1.ts(52,11): error TS2320: Interface 'i ~~~~ !!! error TS2300: Duplicate identifier 'item'. item:number; - ~~~~~~~~~~~~ + ~~~~ !!! error TS2300: Duplicate identifier 'item'. } diff --git a/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt b/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt index a6bccf35f39..39e5cfaa834 100644 --- a/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt +++ b/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt @@ -21,7 +21,7 @@ tests/cases/compiler/lastPropertyInLiteralWins.ts(14,5): error TS2300: Duplicate ~~~~~ !!! error TS2300: Duplicate identifier 'thunk'. thunk: (num: number) => {} - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~ !!! error TS2300: Duplicate identifier 'thunk'. }); @@ -33,7 +33,7 @@ tests/cases/compiler/lastPropertyInLiteralWins.ts(14,5): error TS2300: Duplicate !!! error TS2300: Duplicate identifier 'thunk'. thunk: (str: string) => {} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~ !!! error TS2300: Duplicate identifier 'thunk'. }); ~ diff --git a/tests/baselines/reference/memberOverride.errors.txt b/tests/baselines/reference/memberOverride.errors.txt index 896275c70b1..c63803f5aa1 100644 --- a/tests/baselines/reference/memberOverride.errors.txt +++ b/tests/baselines/reference/memberOverride.errors.txt @@ -11,7 +11,7 @@ tests/cases/compiler/memberOverride.ts(8,5): error TS2323: Type 'string' is not ~ !!! error TS2300: Duplicate identifier 'a'. a: 5 - ~~~~ + ~ !!! error TS2300: Duplicate identifier 'a'. } diff --git a/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames.errors.txt b/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames.errors.txt index 5ea03a4970e..0b5984dcc6d 100644 --- a/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames.errors.txt @@ -15,7 +15,7 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConfli interface A { x: number; - ~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } @@ -28,7 +28,7 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConfli interface A { x: number; // error - ~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } } @@ -56,7 +56,7 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConfli module M3 { export interface A { x: number; // error - ~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } } \ No newline at end of file diff --git a/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames2.errors.txt b/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames2.errors.txt index cdf41dfc91d..d0a50f4ae69 100644 --- a/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames2.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames2.errors.txt @@ -15,7 +15,7 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConfli interface A { x: string; // error - ~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } @@ -28,7 +28,7 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConfli interface A { x: T; // error - ~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } } @@ -56,7 +56,7 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConfli module M3 { export interface A { x: T; // error - ~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } } \ No newline at end of file diff --git a/tests/baselines/reference/nameCollisions.errors.txt b/tests/baselines/reference/nameCollisions.errors.txt index ac4bd770c1d..baa7c6cbfd5 100644 --- a/tests/baselines/reference/nameCollisions.errors.txt +++ b/tests/baselines/reference/nameCollisions.errors.txt @@ -4,11 +4,11 @@ tests/cases/compiler/nameCollisions.ts(10,12): error TS2300: Duplicate identifie tests/cases/compiler/nameCollisions.ts(13,9): error TS2300: Duplicate identifier 'z'. tests/cases/compiler/nameCollisions.ts(15,12): error TS2434: A module declaration cannot be located prior to a class or function with which it is merged tests/cases/compiler/nameCollisions.ts(24,9): error TS2300: Duplicate identifier 'f'. -tests/cases/compiler/nameCollisions.ts(25,5): error TS2300: Duplicate identifier 'f'. +tests/cases/compiler/nameCollisions.ts(25,14): error TS2300: Duplicate identifier 'f'. tests/cases/compiler/nameCollisions.ts(27,14): error TS2300: Duplicate identifier 'f2'. tests/cases/compiler/nameCollisions.ts(28,9): error TS2300: Duplicate identifier 'f2'. tests/cases/compiler/nameCollisions.ts(33,11): error TS2300: Duplicate identifier 'C'. -tests/cases/compiler/nameCollisions.ts(34,5): error TS2300: Duplicate identifier 'C'. +tests/cases/compiler/nameCollisions.ts(34,14): error TS2300: Duplicate identifier 'C'. tests/cases/compiler/nameCollisions.ts(36,14): error TS2300: Duplicate identifier 'C2'. tests/cases/compiler/nameCollisions.ts(37,11): error TS2300: Duplicate identifier 'C2'. tests/cases/compiler/nameCollisions.ts(42,11): error TS2300: Duplicate identifier 'cli'. @@ -55,7 +55,7 @@ tests/cases/compiler/nameCollisions.ts(46,11): error TS2300: Duplicate identifie ~ !!! error TS2300: Duplicate identifier 'f'. function f() { } //error - ~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'f'. function f2() { } @@ -72,7 +72,7 @@ tests/cases/compiler/nameCollisions.ts(46,11): error TS2300: Duplicate identifie ~ !!! error TS2300: Duplicate identifier 'C'. function C() { } // error - ~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'C'. function C2() { } diff --git a/tests/baselines/reference/numericClassMembers1.errors.txt b/tests/baselines/reference/numericClassMembers1.errors.txt index 7d17e7cdcbe..eb99f26bb4c 100644 --- a/tests/baselines/reference/numericClassMembers1.errors.txt +++ b/tests/baselines/reference/numericClassMembers1.errors.txt @@ -10,7 +10,7 @@ tests/cases/compiler/numericClassMembers1.ts(8,2): error TS2300: Duplicate ident ~ !!! error TS2300: Duplicate identifier '0'. 0.0 = 2; - ~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier '0.0'. } @@ -19,7 +19,7 @@ tests/cases/compiler/numericClassMembers1.ts(8,2): error TS2300: Duplicate ident ~~~ !!! error TS2300: Duplicate identifier '0.0'. '0' = 2; - ~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier ''0''. } diff --git a/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt b/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt index 663cf45fcff..c5890d7c98c 100644 --- a/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt +++ b/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt @@ -2,7 +2,7 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedP tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(2,5): error TS2300: Duplicate identifier '1'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(3,5): error TS2300: Duplicate identifier '1.0'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(4,12): error TS2300: Duplicate identifier '2'. -tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(5,5): error TS2300: Duplicate identifier '2'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(5,12): error TS2300: Duplicate identifier '2'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(9,5): error TS2300: Duplicate identifier '2'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(10,5): error TS2300: Duplicate identifier '2.'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(14,5): error TS2300: Duplicate identifier '1'. @@ -17,13 +17,13 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedP ~ !!! error TS2300: Duplicate identifier '1'. 1.0: number; - ~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier '1.0'. static 2: number; ~ !!! error TS2300: Duplicate identifier '2'. static 2: number; - ~~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier '2'. } @@ -32,7 +32,7 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedP ~ !!! error TS2300: Duplicate identifier '2'. 2.: number; - ~~~~~~~~~~~ + ~~ !!! error TS2300: Duplicate identifier '2.'. } @@ -41,7 +41,7 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedP ~ !!! error TS2300: Duplicate identifier '1'. 1: number; - ~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier '1'. } @@ -52,6 +52,6 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedP 2: 1 ~ !!! error TS1005: ',' expected. - ~~~~ + ~ !!! error TS2300: Duplicate identifier '2'. } \ No newline at end of file diff --git a/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt b/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt index a5353efe9ad..4ebef99bd07 100644 --- a/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt +++ b/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt @@ -17,7 +17,7 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericString !!! error TS2300: Duplicate identifier '"1"'. "1.0": number; // not a duplicate 1.0: number; - ~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier '1.0'. } @@ -27,7 +27,7 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericString !!! error TS2300: Duplicate identifier '"1"'. "1.": number; // not a duplicate 1: number; - ~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier '1'. } @@ -36,7 +36,7 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericString ~~~ !!! error TS2300: Duplicate identifier '"1"'. 1.0: string; - ~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier '1.0'. } @@ -45,6 +45,6 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericString ~~~ !!! error TS2300: Duplicate identifier '"0"'. 0: '' - ~~~~~ + ~ !!! error TS2300: Duplicate identifier '0'. } \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralErrors.errors.txt b/tests/baselines/reference/objectLiteralErrors.errors.txt index a301ae56b5f..1fc92ac5a48 100644 --- a/tests/baselines/reference/objectLiteralErrors.errors.txt +++ b/tests/baselines/reference/objectLiteralErrors.errors.txt @@ -55,41 +55,41 @@ tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(19,22) tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(20,13): error TS2300: Duplicate identifier 'a'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(20,25): error TS2300: Duplicate identifier 'a'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(23,12): error TS2300: Duplicate identifier 'a'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(23,18): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(23,22): error TS2300: Duplicate identifier 'a'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(24,12): error TS2300: Duplicate identifier 'a'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(24,19): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(24,23): error TS2300: Duplicate identifier 'a'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(25,12): error TS2300: Duplicate identifier 'a'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(25,18): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(25,22): error TS2300: Duplicate identifier 'a'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(26,12): error TS2300: Duplicate identifier 'a'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(26,21): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(26,25): error TS2300: Duplicate identifier 'a'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(27,12): error TS2300: Duplicate identifier 'a'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(27,19): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(27,23): error TS2300: Duplicate identifier 'a'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(28,12): error TS2300: Duplicate identifier 'a'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(28,18): error TS2300: Duplicate identifier ''a''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(28,22): error TS2300: Duplicate identifier ''a''. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(29,12): error TS2300: Duplicate identifier ''a''. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(29,20): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(29,24): error TS2300: Duplicate identifier 'a'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(30,12): error TS2300: Duplicate identifier ''a''. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(30,20): error TS2300: Duplicate identifier '"a"'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(30,24): error TS2300: Duplicate identifier '"a"'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(31,12): error TS2300: Duplicate identifier ''a''. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(31,20): error TS2300: Duplicate identifier ''a''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(31,24): error TS2300: Duplicate identifier ''a''. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(32,13): error TS2300: Duplicate identifier '"a"'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(32,21): error TS2300: Duplicate identifier ''a''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(32,25): error TS2300: Duplicate identifier ''a''. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(33,13): error TS2300: Duplicate identifier '1.0'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(33,21): error TS2300: Duplicate identifier ''1''. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(33,25): error TS2300: Duplicate identifier ''1''. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(34,13): error TS2300: Duplicate identifier '0'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(34,19): error TS2300: Duplicate identifier '0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(34,23): error TS2300: Duplicate identifier '0'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(35,13): error TS2300: Duplicate identifier '0'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(35,19): error TS2300: Duplicate identifier '0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(35,23): error TS2300: Duplicate identifier '0'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(36,13): error TS2300: Duplicate identifier '0'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(36,19): error TS2300: Duplicate identifier '0x0'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(36,23): error TS2300: Duplicate identifier '0x0'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(37,13): error TS2300: Duplicate identifier '0'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(37,19): error TS2300: Duplicate identifier '000'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(37,23): error TS2300: Duplicate identifier '000'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(38,13): error TS2300: Duplicate identifier '"100"'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(38,23): error TS2300: Duplicate identifier '1e2'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(38,27): error TS2300: Duplicate identifier '1e2'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(39,13): error TS2300: Duplicate identifier '0x20'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(39,22): error TS2300: Duplicate identifier '3.2e1'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(39,26): error TS2300: Duplicate identifier '3.2e1'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(40,13): error TS2300: Duplicate identifier 'a'. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(40,42): error TS2300: Duplicate identifier 'a'. +tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(40,46): error TS2300: Duplicate identifier 'a'. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(43,12): error TS2380: 'get' and 'set' accessor must have the same type. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(43,43): error TS2380: 'get' and 'set' accessor must have the same type. tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(44,29): error TS2323: Type 'number' is not assignable to type 'string'. @@ -103,94 +103,94 @@ tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(45,51) var e1 = { a: 0, a: 0 }; ~ !!! error TS2300: Duplicate identifier 'a'. - ~~~~ + ~ !!! error TS2300: Duplicate identifier 'a'. var e2 = { a: '', a: '' }; ~ !!! error TS2300: Duplicate identifier 'a'. - ~~~~~ + ~ !!! error TS2300: Duplicate identifier 'a'. var e3 = { a: 0, a: '' }; ~ !!! error TS2300: Duplicate identifier 'a'. - ~~~~~ + ~ !!! error TS2300: Duplicate identifier 'a'. var e4 = { a: true, a: false }; ~ !!! error TS2300: Duplicate identifier 'a'. - ~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'a'. var e5 = { a: {}, a: {} }; ~ !!! error TS2300: Duplicate identifier 'a'. - ~~~~~ + ~ !!! error TS2300: Duplicate identifier 'a'. var e6 = { a: 0, 'a': 0 }; ~ !!! error TS2300: Duplicate identifier 'a'. - ~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier ''a''. var e7 = { 'a': 0, a: 0 }; ~~~ !!! error TS2300: Duplicate identifier ''a''. - ~~~~ + ~ !!! error TS2300: Duplicate identifier 'a'. var e8 = { 'a': 0, "a": 0 }; ~~~ !!! error TS2300: Duplicate identifier ''a''. - ~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier '"a"'. var e9 = { 'a': 0, 'a': 0 }; ~~~ !!! error TS2300: Duplicate identifier ''a''. - ~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier ''a''. var e10 = { "a": 0, 'a': 0 }; ~~~ !!! error TS2300: Duplicate identifier '"a"'. - ~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier ''a''. var e11 = { 1.0: 0, '1': 0 }; ~~~ !!! error TS2300: Duplicate identifier '1.0'. - ~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier ''1''. var e12 = { 0: 0, 0: 0 }; ~ !!! error TS2300: Duplicate identifier '0'. - ~~~~ + ~ !!! error TS2300: Duplicate identifier '0'. var e13 = { 0: 0, 0: 0 }; ~ !!! error TS2300: Duplicate identifier '0'. - ~~~~ + ~ !!! error TS2300: Duplicate identifier '0'. var e14 = { 0: 0, 0x0: 0 }; ~ !!! error TS2300: Duplicate identifier '0'. - ~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier '0x0'. var e14 = { 0: 0, 000: 0 }; ~~~ !!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. ~ !!! error TS2300: Duplicate identifier '0'. - ~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier '000'. var e15 = { "100": 0, 1e2: 0 }; ~~~~~ !!! error TS2300: Duplicate identifier '"100"'. - ~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier '1e2'. var e16 = { 0x20: 0, 3.2e1: 0 }; ~~~~ !!! error TS2300: Duplicate identifier '0x20'. - ~~~~~~~~ + ~~~~~ !!! error TS2300: Duplicate identifier '3.2e1'. var e17 = { a: 0, b: 1, a: 0 }; ~ !!! error TS2300: Duplicate identifier 'a'. - ~~~~ + ~ !!! error TS2300: Duplicate identifier 'a'. // Accessor and property with the same name @@ -199,98 +199,98 @@ tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(45,51) !!! error TS1119: An object literal cannot have property and accessor with the same name. ~ !!! error TS2300: Duplicate identifier 'a'. - ~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'a'. var f2 = { a: '', get a() { return ''; } }; ~ !!! error TS1119: An object literal cannot have property and accessor with the same name. ~ !!! error TS2300: Duplicate identifier 'a'. - ~~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'a'. var f3 = { a: 0, get a() { return ''; } }; ~ !!! error TS1119: An object literal cannot have property and accessor with the same name. ~ !!! error TS2300: Duplicate identifier 'a'. - ~~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'a'. var f4 = { a: true, get a() { return false; } }; ~ !!! error TS1119: An object literal cannot have property and accessor with the same name. ~ !!! error TS2300: Duplicate identifier 'a'. - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'a'. var f5 = { a: {}, get a() { return {}; } }; ~ !!! error TS1119: An object literal cannot have property and accessor with the same name. ~ !!! error TS2300: Duplicate identifier 'a'. - ~~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'a'. var f6 = { a: 0, get 'a'() { return 0; } }; ~~~ !!! error TS1119: An object literal cannot have property and accessor with the same name. ~ !!! error TS2300: Duplicate identifier 'a'. - ~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier ''a''. var f7 = { 'a': 0, get a() { return 0; } }; ~ !!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ !!! error TS2300: Duplicate identifier ''a''. - ~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'a'. var f8 = { 'a': 0, get "a"() { return 0; } }; ~~~ !!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ !!! error TS2300: Duplicate identifier ''a''. - ~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier '"a"'. var f9 = { 'a': 0, get 'a'() { return 0; } }; ~~~ !!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ !!! error TS2300: Duplicate identifier ''a''. - ~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier ''a''. var f10 = { "a": 0, get 'a'() { return 0; } }; ~~~ !!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ !!! error TS2300: Duplicate identifier '"a"'. - ~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier ''a''. var f11 = { 1.0: 0, get '1'() { return 0; } }; ~~~ !!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ !!! error TS2300: Duplicate identifier '1.0'. - ~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier ''1''. var f12 = { 0: 0, get 0() { return 0; } }; ~ !!! error TS1119: An object literal cannot have property and accessor with the same name. ~ !!! error TS2300: Duplicate identifier '0'. - ~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier '0'. var f13 = { 0: 0, get 0() { return 0; } }; ~ !!! error TS1119: An object literal cannot have property and accessor with the same name. ~ !!! error TS2300: Duplicate identifier '0'. - ~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier '0'. var f14 = { 0: 0, get 0x0() { return 0; } }; ~~~ !!! error TS1119: An object literal cannot have property and accessor with the same name. ~ !!! error TS2300: Duplicate identifier '0'. - ~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier '0x0'. var f14 = { 0: 0, get 000() { return 0; } }; ~~~ @@ -299,28 +299,28 @@ tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(45,51) !!! error TS1119: An object literal cannot have property and accessor with the same name. ~ !!! error TS2300: Duplicate identifier '0'. - ~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier '000'. var f15 = { "100": 0, get 1e2() { return 0; } }; ~~~ !!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~~~ !!! error TS2300: Duplicate identifier '"100"'. - ~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier '1e2'. var f16 = { 0x20: 0, get 3.2e1() { return 0; } }; ~~~~~ !!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~~ !!! error TS2300: Duplicate identifier '0x20'. - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~ !!! error TS2300: Duplicate identifier '3.2e1'. var f17 = { a: 0, get b() { return 1; }, get a() { return 0; } }; ~ !!! error TS1119: An object literal cannot have property and accessor with the same name. ~ !!! error TS2300: Duplicate identifier 'a'. - ~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'a'. // Get and set accessor with mismatched type annotations diff --git a/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt b/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt index 018dae20a79..c89cd04d1ee 100644 --- a/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt +++ b/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt @@ -25,13 +25,13 @@ tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts( ~ !!! error TS2300: Duplicate identifier '1'. 1.0; - ~~~~ + ~~~ !!! error TS2300: Duplicate identifier '1.0'. 1.; - ~~~ + ~~ !!! error TS2300: Duplicate identifier '1.'. 1.00; - ~~~~~ + ~~~~ !!! error TS2300: Duplicate identifier '1.00'. } @@ -40,13 +40,13 @@ tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts( ~ !!! error TS2300: Duplicate identifier '1'. 1.0; - ~~~~ + ~~~ !!! error TS2300: Duplicate identifier '1.0'. 1.; - ~~~ + ~~ !!! error TS2300: Duplicate identifier '1.'. 1.00; - ~~~~~ + ~~~~ !!! error TS2300: Duplicate identifier '1.00'. } @@ -55,13 +55,13 @@ tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts( ~ !!! error TS2300: Duplicate identifier '1'. 1.0; - ~~~~ + ~~~ !!! error TS2300: Duplicate identifier '1.0'. 1.; - ~~~ + ~~ !!! error TS2300: Duplicate identifier '1.'. 1.00; - ~~~~~ + ~~~~ !!! error TS2300: Duplicate identifier '1.00'. } @@ -70,13 +70,13 @@ tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts( ~ !!! error TS2300: Duplicate identifier '1'. 1.0: 1, - ~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier '1.0'. 1.: 1, - ~~~~~ + ~~ !!! error TS2300: Duplicate identifier '1.'. 1.00: 1 - ~~~~~~~ + ~~~~ !!! error TS2300: Duplicate identifier '1.00'. } diff --git a/tests/baselines/reference/optionalParamArgsTest.errors.txt b/tests/baselines/reference/optionalParamArgsTest.errors.txt index 8f02c603eb7..a8ce88e494e 100644 --- a/tests/baselines/reference/optionalParamArgsTest.errors.txt +++ b/tests/baselines/reference/optionalParamArgsTest.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/optionalParamArgsTest.ts(35,47): error TS1016: A required parameter cannot follow an optional parameter. -tests/cases/compiler/optionalParamArgsTest.ts(31,5): error TS2393: Duplicate function implementation. -tests/cases/compiler/optionalParamArgsTest.ts(35,5): error TS2393: Duplicate function implementation. +tests/cases/compiler/optionalParamArgsTest.ts(31,12): error TS2393: Duplicate function implementation. +tests/cases/compiler/optionalParamArgsTest.ts(35,12): error TS2393: Duplicate function implementation. tests/cases/compiler/optionalParamArgsTest.ts(99,1): error TS2346: Supplied parameters do not match any signature of call target. tests/cases/compiler/optionalParamArgsTest.ts(100,1): error TS2346: Supplied parameters do not match any signature of call target. tests/cases/compiler/optionalParamArgsTest.ts(101,1): error TS2346: Supplied parameters do not match any signature of call target. @@ -55,7 +55,7 @@ tests/cases/compiler/optionalParamArgsTest.ts(118,1): error TS2346: Supplied par public C1M4(C1M4A1:number,C1M4A2?:number) { return C1M4A1 + C1M4A2; } public C1M5(C1M5A1:number,C1M5A2:number=0,C1M5A3?:number) { return C1M5A1 + C1M5A2; } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~ !!! error TS2393: Duplicate function implementation. // Negative test @@ -63,7 +63,7 @@ tests/cases/compiler/optionalParamArgsTest.ts(118,1): error TS2346: Supplied par public C1M5(C1M5A1:number,C1M5A2:number=0,C1M5A3:number) { return C1M5A1 + C1M5A2; } ~~~~~~ !!! error TS1016: A required parameter cannot follow an optional parameter. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~ !!! error TS2393: Duplicate function implementation. } diff --git a/tests/baselines/reference/optionalPropertiesSyntax.errors.txt b/tests/baselines/reference/optionalPropertiesSyntax.errors.txt index 41197ac64e1..66c1cae2a7e 100644 --- a/tests/baselines/reference/optionalPropertiesSyntax.errors.txt +++ b/tests/baselines/reference/optionalPropertiesSyntax.errors.txt @@ -55,7 +55,7 @@ tests/cases/compiler/optionalPropertiesSyntax.ts(34,5): error TS2375: Duplicate ~~~~ !!! error TS2300: Duplicate identifier 'prop'. prop?: any; - ~~~~~~~~~~~ + ~~~~ !!! error TS2300: Duplicate identifier 'prop'. prop2?: any; } diff --git a/tests/baselines/reference/overloadsWithinClasses.errors.txt b/tests/baselines/reference/overloadsWithinClasses.errors.txt index 39e43d26707..02872861a4b 100644 --- a/tests/baselines/reference/overloadsWithinClasses.errors.txt +++ b/tests/baselines/reference/overloadsWithinClasses.errors.txt @@ -1,16 +1,16 @@ -tests/cases/compiler/overloadsWithinClasses.ts(3,5): error TS2393: Duplicate function implementation. -tests/cases/compiler/overloadsWithinClasses.ts(5,5): error TS2393: Duplicate function implementation. +tests/cases/compiler/overloadsWithinClasses.ts(3,12): error TS2393: Duplicate function implementation. +tests/cases/compiler/overloadsWithinClasses.ts(5,12): error TS2393: Duplicate function implementation. ==== tests/cases/compiler/overloadsWithinClasses.ts (2 errors) ==== class foo { static fnOverload( ) {} - ~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2393: Duplicate function implementation. static fnOverload(foo: string){ } // error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ !!! error TS2393: Duplicate function implementation. } diff --git a/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt b/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt index 78a4706ec68..5885385a20c 100644 --- a/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt +++ b/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/parameterPropertyInConstructor2.ts(3,5): error TS2394: Overload signature is not compatible with function implementation. tests/cases/compiler/parameterPropertyInConstructor2.ts(3,17): error TS2369: A parameter property is only allowed in a constructor implementation. tests/cases/compiler/parameterPropertyInConstructor2.ts(3,24): error TS2300: Duplicate identifier 'names'. -tests/cases/compiler/parameterPropertyInConstructor2.ts(4,17): error TS2300: Duplicate identifier 'names'. +tests/cases/compiler/parameterPropertyInConstructor2.ts(4,24): error TS2300: Duplicate identifier 'names'. ==== tests/cases/compiler/parameterPropertyInConstructor2.ts (4 errors) ==== @@ -15,7 +15,7 @@ tests/cases/compiler/parameterPropertyInConstructor2.ts(4,17): error TS2300: Dup ~~~~~ !!! error TS2300: Duplicate identifier 'names'. constructor(public names: string, public ages: number) { - ~~~~~~~~~~~~~~~~~~~~ + ~~~~~ !!! error TS2300: Duplicate identifier 'names'. } } diff --git a/tests/baselines/reference/parserErrorRecovery_ModuleElement2.errors.txt b/tests/baselines/reference/parserErrorRecovery_ModuleElement2.errors.txt index ab0327a716f..eb4d6dc3471 100644 --- a/tests/baselines/reference/parserErrorRecovery_ModuleElement2.errors.txt +++ b/tests/baselines/reference/parserErrorRecovery_ModuleElement2.errors.txt @@ -1,21 +1,19 @@ tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement2.ts(7,1): error TS1128: Declaration or statement expected. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement2.ts(8,1): error TS1128: Declaration or statement expected. -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement2.ts(1,1): error TS2393: Duplicate function implementation. -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement2.ts(4,1): error TS2393: Duplicate function implementation. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement2.ts(1,10): error TS2393: Duplicate function implementation. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement2.ts(4,10): error TS2393: Duplicate function implementation. ==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement2.ts (4 errors) ==== function foo() { - ~~~~~~~~~~~~~~~~ - } - ~ + ~~~ !!! error TS2393: Duplicate function implementation. + } function foo() { - ~~~~~~~~~~~~~~~~ - } - ~ + ~~~ !!! error TS2393: Duplicate function implementation. + } ) ~ diff --git a/tests/baselines/reference/parserMemberFunctionDeclarationAmbiguities1.errors.txt b/tests/baselines/reference/parserMemberFunctionDeclarationAmbiguities1.errors.txt index 69db4ac7b57..e0d49bb8470 100644 --- a/tests/baselines/reference/parserMemberFunctionDeclarationAmbiguities1.errors.txt +++ b/tests/baselines/reference/parserMemberFunctionDeclarationAmbiguities1.errors.txt @@ -1,40 +1,40 @@ tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(2,3): error TS2393: Duplicate function implementation. tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(3,3): error TS2393: Duplicate function implementation. -tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(5,3): error TS2393: Duplicate function implementation. -tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(6,3): error TS2393: Duplicate function implementation. -tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(8,3): error TS2393: Duplicate function implementation. -tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(9,3): error TS2393: Duplicate function implementation. -tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(11,3): error TS2393: Duplicate function implementation. -tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(12,3): error TS2393: Duplicate function implementation. +tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(5,10): error TS2393: Duplicate function implementation. +tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(6,10): error TS2393: Duplicate function implementation. +tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(8,17): error TS2393: Duplicate function implementation. +tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(9,17): error TS2393: Duplicate function implementation. +tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(11,10): error TS2393: Duplicate function implementation. +tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts(12,10): error TS2393: Duplicate function implementation. ==== tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclarationAmbiguities1.ts (8 errors) ==== class C { public() {} - ~~~~~~~~~~~ + ~~~~~~ !!! error TS2393: Duplicate function implementation. static() {} - ~~~~~~~~~~~ + ~~~~~~ !!! error TS2393: Duplicate function implementation. public public() {} - ~~~~~~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2393: Duplicate function implementation. public static() {} - ~~~~~~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2393: Duplicate function implementation. public static public() {} - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2393: Duplicate function implementation. public static static() {} - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2393: Duplicate function implementation. static public() {} - ~~~~~~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2393: Duplicate function implementation. static static() {} - ~~~~~~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2393: Duplicate function implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/propertyAndAccessorWithSameName.errors.txt b/tests/baselines/reference/propertyAndAccessorWithSameName.errors.txt index a08a924ff75..9ef943cc07a 100644 --- a/tests/baselines/reference/propertyAndAccessorWithSameName.errors.txt +++ b/tests/baselines/reference/propertyAndAccessorWithSameName.errors.txt @@ -3,12 +3,12 @@ tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWi tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(18,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(2,5): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(3,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(3,9): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(9,5): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(10,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(10,9): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(14,13): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(15,5): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(18,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(15,9): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(18,9): error TS2300: Duplicate identifier 'x'. ==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts (11 errors) ==== @@ -19,12 +19,10 @@ tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWi get x() { // error ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~~ - return 1; - ~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. + return 1; + } } class D { @@ -34,7 +32,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWi set x(v) { } // error ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } @@ -45,15 +43,13 @@ tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWi get x() { // error ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~~ - return 1; - ~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. + return 1; + } set x(v) { } ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/propertyAndFunctionWithSameName.errors.txt b/tests/baselines/reference/propertyAndFunctionWithSameName.errors.txt index 58b51c9c39e..84428a2dfb1 100644 --- a/tests/baselines/reference/propertyAndFunctionWithSameName.errors.txt +++ b/tests/baselines/reference/propertyAndFunctionWithSameName.errors.txt @@ -10,12 +10,10 @@ tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndFunctionWi ~ !!! error TS2300: Duplicate identifier 'x'. x() { // error - ~~~~~~~~~~~~~~ - return 1; - ~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. + return 1; + } } class D { @@ -23,6 +21,6 @@ tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndFunctionWi ~ !!! error TS2300: Duplicate identifier 'x'. x(v) { } // error - ~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/propertyNamedPrototype.errors.txt b/tests/baselines/reference/propertyNamedPrototype.errors.txt index 38f8279daed..6ce4054fb43 100644 --- a/tests/baselines/reference/propertyNamedPrototype.errors.txt +++ b/tests/baselines/reference/propertyNamedPrototype.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedPrototype.ts(3,5): error TS2300: Duplicate identifier 'prototype'. +tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedPrototype.ts(3,12): error TS2300: Duplicate identifier 'prototype'. ==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedPrototype.ts (1 errors) ==== class C { prototype: number; // ok static prototype: C; // error - ~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~ !!! error TS2300: Duplicate identifier 'prototype'. } \ No newline at end of file diff --git a/tests/baselines/reference/propertySignatures.errors.txt b/tests/baselines/reference/propertySignatures.errors.txt index c6bc759dce8..fd415334e74 100644 --- a/tests/baselines/reference/propertySignatures.errors.txt +++ b/tests/baselines/reference/propertySignatures.errors.txt @@ -8,7 +8,7 @@ tests/cases/compiler/propertySignatures.ts(14,12): error TS2304: Cannot find nam var foo1: { a:string; a: string; }; ~ !!! error TS2300: Duplicate identifier 'a'. - ~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'a'. // Should be OK diff --git a/tests/baselines/reference/reassignStaticProp.errors.txt b/tests/baselines/reference/reassignStaticProp.errors.txt index e1d845c20e4..bbcfe826787 100644 --- a/tests/baselines/reference/reassignStaticProp.errors.txt +++ b/tests/baselines/reference/reassignStaticProp.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/reassignStaticProp.ts(3,12): error TS2300: Duplicate identifier 'bar'. -tests/cases/compiler/reassignStaticProp.ts(5,5): error TS2300: Duplicate identifier 'bar'. +tests/cases/compiler/reassignStaticProp.ts(5,12): error TS2300: Duplicate identifier 'bar'. ==== tests/cases/compiler/reassignStaticProp.ts (2 errors) ==== @@ -10,7 +10,7 @@ tests/cases/compiler/reassignStaticProp.ts(5,5): error TS2300: Duplicate identif !!! error TS2300: Duplicate identifier 'bar'. static bar:string; // errror - duplicate id - ~~~~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'bar'. } diff --git a/tests/baselines/reference/staticPrototypeProperty.errors.txt b/tests/baselines/reference/staticPrototypeProperty.errors.txt index 32d4438a2cc..19b3f3ffb20 100644 --- a/tests/baselines/reference/staticPrototypeProperty.errors.txt +++ b/tests/baselines/reference/staticPrototypeProperty.errors.txt @@ -1,16 +1,16 @@ -tests/cases/compiler/staticPrototypeProperty.ts(2,4): error TS2300: Duplicate identifier 'prototype'. -tests/cases/compiler/staticPrototypeProperty.ts(6,4): error TS2300: Duplicate identifier 'prototype'. +tests/cases/compiler/staticPrototypeProperty.ts(2,11): error TS2300: Duplicate identifier 'prototype'. +tests/cases/compiler/staticPrototypeProperty.ts(6,11): error TS2300: Duplicate identifier 'prototype'. ==== tests/cases/compiler/staticPrototypeProperty.ts (2 errors) ==== class C { static prototype() { } - ~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~ !!! error TS2300: Duplicate identifier 'prototype'. } class C2 { static prototype; - ~~~~~~~~~~~~~~~~~ + ~~~~~~~~~ !!! error TS2300: Duplicate identifier 'prototype'. } \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.errors.txt b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.errors.txt index 80857aa1804..cbc517e0520 100644 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.errors.txt +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.errors.txt @@ -65,7 +65,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralType ~~~~~~~~~~~~~~~~ !!! error TS2381: A signature with an implementation cannot use a string literal type. foo(x: 'a') { }, - ~~~~~~~~~~~~~~~ + ~~~ !!! error TS2300: Duplicate identifier 'foo'. } \ No newline at end of file diff --git a/tests/baselines/reference/stringNamedPropertyDuplicates.errors.txt b/tests/baselines/reference/stringNamedPropertyDuplicates.errors.txt index 9c929aa47ce..e15cb03e062 100644 --- a/tests/baselines/reference/stringNamedPropertyDuplicates.errors.txt +++ b/tests/baselines/reference/stringNamedPropertyDuplicates.errors.txt @@ -2,7 +2,7 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPr tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(2,5): error TS2300: Duplicate identifier '"a b"'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(3,5): error TS2300: Duplicate identifier '"a b"'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(4,12): error TS2300: Duplicate identifier '"c d"'. -tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(5,5): error TS2300: Duplicate identifier '"c d"'. +tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(5,12): error TS2300: Duplicate identifier '"c d"'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(9,5): error TS2300: Duplicate identifier '"a b"'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(10,5): error TS2300: Duplicate identifier '"a b"'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPropertyDuplicates.ts(14,5): error TS2300: Duplicate identifier '"a b"'. @@ -17,13 +17,13 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPr ~~~~~ !!! error TS2300: Duplicate identifier '"a b"'. "a b": number; - ~~~~~~~~~~~~~~ + ~~~~~ !!! error TS2300: Duplicate identifier '"a b"'. static "c d": number; ~~~~~ !!! error TS2300: Duplicate identifier '"c d"'. static "c d": number; - ~~~~~~~~~~~~~~~~~~~~~ + ~~~~~ !!! error TS2300: Duplicate identifier '"c d"'. } @@ -32,7 +32,7 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPr ~~~~~ !!! error TS2300: Duplicate identifier '"a b"'. "a b": number; - ~~~~~~~~~~~~~~ + ~~~~~ !!! error TS2300: Duplicate identifier '"a b"'. } @@ -41,7 +41,7 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPr ~~~~~ !!! error TS2300: Duplicate identifier '"a b"'. "a b": number; - ~~~~~~~~~~~~~~ + ~~~~~ !!! error TS2300: Duplicate identifier '"a b"'. } @@ -52,6 +52,6 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPr "a b": 1 ~~~~~ !!! error TS1005: ',' expected. - ~~~~~~~~ + ~~~~~ !!! error TS2300: Duplicate identifier '"a b"'. } \ No newline at end of file diff --git a/tests/baselines/reference/targetTypeCastTest.errors.txt b/tests/baselines/reference/targetTypeCastTest.errors.txt index c00ddb36728..c44de5535d0 100644 --- a/tests/baselines/reference/targetTypeCastTest.errors.txt +++ b/tests/baselines/reference/targetTypeCastTest.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/targetTypeCastTest.ts(1,13): error TS2300: Duplicate identifier 'Point'. -tests/cases/compiler/targetTypeCastTest.ts(3,1): error TS2300: Duplicate identifier 'Point'. +tests/cases/compiler/targetTypeCastTest.ts(3,10): error TS2300: Duplicate identifier 'Point'. ==== tests/cases/compiler/targetTypeCastTest.ts (2 errors) ==== @@ -8,14 +8,11 @@ tests/cases/compiler/targetTypeCastTest.ts(3,1): error TS2300: Duplicate identif !!! error TS2300: Duplicate identifier 'Point'. function Point(x, y) { - ~~~~~~~~~~~~~~~~~~~~~~ - this.x = x; - ~~~~~~~~~~~~~~~ - this.y = y; - ~~~~~~~~~~~~~~~~~~ - } - ~ + ~~~~~ !!! error TS2300: Duplicate identifier 'Point'. + this.x = x; + this.y = y; + } interface Adder { (x: number, y: number): number; diff --git a/tests/baselines/reference/targetTypeTest1.errors.txt b/tests/baselines/reference/targetTypeTest1.errors.txt index 1b515bee0fa..a0b05690a3b 100644 --- a/tests/baselines/reference/targetTypeTest1.errors.txt +++ b/tests/baselines/reference/targetTypeTest1.errors.txt @@ -1,8 +1,8 @@ tests/cases/compiler/targetTypeTest1.ts(1,15): error TS2300: Duplicate identifier 'Point'. -tests/cases/compiler/targetTypeTest1.ts(14,1): error TS2300: Duplicate identifier 'Point'. +tests/cases/compiler/targetTypeTest1.ts(14,10): error TS2300: Duplicate identifier 'Point'. tests/cases/compiler/targetTypeTest1.ts(19,18): error TS2384: Overload signatures must all be ambient or non-ambient. tests/cases/compiler/targetTypeTest1.ts(53,15): error TS2300: Duplicate identifier 'C'. -tests/cases/compiler/targetTypeTest1.ts(60,1): error TS2300: Duplicate identifier 'C'. +tests/cases/compiler/targetTypeTest1.ts(60,10): error TS2300: Duplicate identifier 'C'. ==== tests/cases/compiler/targetTypeTest1.ts (5 errors) ==== @@ -22,14 +22,11 @@ tests/cases/compiler/targetTypeTest1.ts(60,1): error TS2300: Duplicate identifie // Because Point is a constructor function, this is inferred // to be Point and return type is inferred to be void function Point(x, y) { - ~~~~~~~~~~~~~~~~~~~~~~ - this.x = x; - ~~~~~~~~~~~~~~~ - this.y = y; - ~~~~~~~~~~~~~~~ - } - ~ + ~~~~~ !!! error TS2300: Duplicate identifier 'Point'. + this.x = x; + this.y = y; + } declare function EF1(a:number, b:number):number; ~~~ @@ -77,14 +74,11 @@ tests/cases/compiler/targetTypeTest1.ts(60,1): error TS2300: Duplicate identifie } function C(a,b) { - ~~~~~~~~~~~~~~~~~ - this.a=a; - ~~~~~~~~~~ - this.b=b; - ~~~~~~~~~~ - } - ~ + ~ !!! error TS2300: Duplicate identifier 'C'. + this.a=a; + this.b=b; + } C.prototype = { a:0, diff --git a/tests/baselines/reference/twoAccessorsWithSameName.errors.txt b/tests/baselines/reference/twoAccessorsWithSameName.errors.txt index fc7b86873f1..81da707c566 100644 --- a/tests/baselines/reference/twoAccessorsWithSameName.errors.txt +++ b/tests/baselines/reference/twoAccessorsWithSameName.errors.txt @@ -10,11 +10,11 @@ tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameN tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(30,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(33,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(2,9): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(3,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(3,9): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(7,9): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(8,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(8,9): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(19,9): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(24,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts(24,9): error TS2300: Duplicate identifier 'x'. ==== tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts (17 errors) ==== @@ -27,7 +27,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameN get x() { return 1; } // error ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } @@ -40,7 +40,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameN set x(v) { } // error ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } @@ -70,12 +70,10 @@ tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameN !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ !!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. - ~~~~~~~~~ - return 1; - ~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. + return 1; + } } var y = { diff --git a/tests/baselines/reference/twoAccessorsWithSameName2.errors.txt b/tests/baselines/reference/twoAccessorsWithSameName2.errors.txt index d431ed5a828..836a06a8192 100644 --- a/tests/baselines/reference/twoAccessorsWithSameName2.errors.txt +++ b/tests/baselines/reference/twoAccessorsWithSameName2.errors.txt @@ -5,9 +5,9 @@ tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameN tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(12,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(15,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(2,16): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(3,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(3,16): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(7,16): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(8,5): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(8,16): error TS2300: Duplicate identifier 'x'. ==== tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts (10 errors) ==== @@ -20,7 +20,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameN static get x() { return 1; } // error ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } @@ -33,7 +33,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameN static set x(v) { } // error ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'x'. } diff --git a/tests/baselines/reference/varAndFunctionShareName.errors.txt b/tests/baselines/reference/varAndFunctionShareName.errors.txt index f849bfdfb54..dc4dd4e1b3b 100644 --- a/tests/baselines/reference/varAndFunctionShareName.errors.txt +++ b/tests/baselines/reference/varAndFunctionShareName.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/varAndFunctionShareName.ts(1,5): error TS2300: Duplicate identifier 'myFn'. -tests/cases/compiler/varAndFunctionShareName.ts(2,1): error TS2300: Duplicate identifier 'myFn'. +tests/cases/compiler/varAndFunctionShareName.ts(2,10): error TS2300: Duplicate identifier 'myFn'. ==== tests/cases/compiler/varAndFunctionShareName.ts (2 errors) ==== @@ -7,5 +7,5 @@ tests/cases/compiler/varAndFunctionShareName.ts(2,1): error TS2300: Duplicate id ~~~~ !!! error TS2300: Duplicate identifier 'myFn'. function myFn(): any { } - ~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~ !!! error TS2300: Duplicate identifier 'myFn'. \ No newline at end of file diff --git a/tests/cases/compiler/callOverloads2.ts b/tests/cases/compiler/callOverloads2.ts index 3379838dbcf..e18815fd46b 100644 --- a/tests/cases/compiler/callOverloads2.ts +++ b/tests/cases/compiler/callOverloads2.ts @@ -10,7 +10,7 @@ class Foo { // error function Foo(); // error -function F1(s:string) {return s;} // error +function F1(s:string) {return s;} // error function F1(a:any) { return a;} // error function Goo(s:string); // error - no implementation diff --git a/tests/cases/compiler/callOverloads4.ts b/tests/cases/compiler/callOverloads4.ts index 3957c822cc9..7240e73d0ac 100644 --- a/tests/cases/compiler/callOverloads4.ts +++ b/tests/cases/compiler/callOverloads4.ts @@ -1,7 +1,7 @@ function Foo():Foo; // error function Foo(s:string):Foo; // error -class Foo { // error +class Foo { // error bar1() { /*WScript.Echo("bar1");*/ } constructor(s: string); constructor(x: any) { diff --git a/tests/cases/fourslash/addFunctionInDuplicatedConstructorClassBody.ts b/tests/cases/fourslash/addFunctionInDuplicatedConstructorClassBody.ts index 3315a226528..adbdd4820a0 100644 --- a/tests/cases/fourslash/addFunctionInDuplicatedConstructorClassBody.ts +++ b/tests/cases/fourslash/addFunctionInDuplicatedConstructorClassBody.ts @@ -9,4 +9,4 @@ goTo.marker(); var func = 'fn() { }'; edit.insert(func); -verify.numberOfErrorsInCurrentFile(1); +verify.numberOfErrorsInCurrentFile(2); diff --git a/tests/cases/fourslash/inheritedModuleMembersForClodule2.ts b/tests/cases/fourslash/inheritedModuleMembersForClodule2.ts index 2be62b045c2..7380936d6b2 100644 --- a/tests/cases/fourslash/inheritedModuleMembersForClodule2.ts +++ b/tests/cases/fourslash/inheritedModuleMembersForClodule2.ts @@ -14,4 +14,4 @@ goTo.marker(); verify.quickInfoExists(); -verify.numberOfErrorsInCurrentFile(2); \ No newline at end of file +verify.numberOfErrorsInCurrentFile(4); \ No newline at end of file diff --git a/tests/cases/fourslash/insertReturnStatementInDuplicateIdentifierFunction.ts b/tests/cases/fourslash/insertReturnStatementInDuplicateIdentifierFunction.ts index a5fd6623610..8abdac6d206 100644 --- a/tests/cases/fourslash/insertReturnStatementInDuplicateIdentifierFunction.ts +++ b/tests/cases/fourslash/insertReturnStatementInDuplicateIdentifierFunction.ts @@ -6,9 +6,9 @@ goTo.marker(); // One error: duplicate identifier 'foo' -verify.numberOfErrorsInCurrentFile(1); +verify.numberOfErrorsInCurrentFile(2); // Shouldn't change the number of errors edit.insert('return null;'); -verify.numberOfErrorsInCurrentFile(1); +verify.numberOfErrorsInCurrentFile(2); From 8e54c62f9e11e90ab97e9ef75ff34d0de946cd88 Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 1 Oct 2014 14:16:55 -0700 Subject: [PATCH 5/5] Fix spelling --- src/compiler/checker.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f1de90565a3..7411a9c50b9 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5669,7 +5669,7 @@ module ts { // names and consistency of modifiers are verified when we check local symbol var isExportSymbolInsideModule = symbol.parent && symbol.parent.flags & SymbolFlags.Module; var duplicateFunctionDeclaration = false; - var multipleConstructorImplemenation = false; + var multipleConstructorImplementation = false; for (var i = 0; i < declarations.length; i++) { var node = declarations[i]; var inAmbientContext = isInAmbientContext(node); @@ -5692,7 +5692,7 @@ module ts { if (node.body && bodyDeclaration) { if (isConstructor) { - multipleConstructorImplemenation = true; + multipleConstructorImplementation = true; } else { duplicateFunctionDeclaration = true; @@ -5719,7 +5719,7 @@ module ts { } } - if (multipleConstructorImplemenation) { + if (multipleConstructorImplementation) { forEach(declarations, declaration => { error(declaration, Diagnostics.Multiple_constructor_implementations_are_not_allowed); });