diff --git a/Jakefile.js b/Jakefile.js index 5bf30c824cd..acc614421e6 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -726,24 +726,40 @@ function runConsoleTests(defaultReporter, defaultSubsets) { subsetRegexes = subsets.map(function (sub) { return "^" + sub + ".*$"; }); subsetRegexes.push("^(?!" + subsets.join("|") + ").*$"); } + var counter = subsetRegexes.length; + var errorStatus; subsetRegexes.forEach(function (subsetRegex, i) { tests = subsetRegex ? ' -g "' + subsetRegex + '"' : ''; var cmd = "mocha" + (debug ? " --debug-brk" : "") + " -R " + reporter + tests + colors + ' -t ' + testTimeout + ' ' + run; console.log(cmd); - function finish() { + function finish(status) { + counter--; + // save first error status + if (status !== undefined && errorStatus === undefined) { + errorStatus = status; + } + deleteTemporaryProjectOutput(); - complete(); + if (counter !== 0 || errorStatus === undefined) { + // run linter when last worker is finished + if (lintFlag && counter === 0) { + var lint = jake.Task['lint']; + lint.addListener('complete', function () { + complete(); + }); + lint.invoke(); + } + complete(); + } + else { + fail("Process exited with code " + status); + } } exec(cmd, function () { - if (lintFlag && i === 0) { - var lint = jake.Task['lint']; - lint.addListener('complete', function () { - complete(); - }); - lint.invoke(); - } finish(); - }, finish); + }, function(e, status) { + finish(status); + }); }); } diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 70db18b0f29..4768a357d2b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -12975,18 +12975,20 @@ namespace ts { const names = static ? staticNames : instanceNames; const memberName = member.name && getPropertyNameForPropertyNameNode(member.name); - switch (member.kind) { - case SyntaxKind.GetAccessor: - addName(names, member.name, memberName, getter); - break; + if (memberName) { + switch (member.kind) { + case SyntaxKind.GetAccessor: + addName(names, member.name, memberName, getter); + break; - case SyntaxKind.SetAccessor: - addName(names, member.name, memberName, setter); - break; + case SyntaxKind.SetAccessor: + addName(names, member.name, memberName, setter); + break; - case SyntaxKind.PropertyDeclaration: - addName(names, member.name, memberName, property); - break; + case SyntaxKind.PropertyDeclaration: + addName(names, member.name, memberName, property); + break; + } } } } diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 7f2972e8125..4fd3161d1dc 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -1096,14 +1096,6 @@ namespace FourSlash { } addSpanInfoString(); return resultString; - - function repeatString(count: number, char: string) { - let result = ""; - for (let i = 0; i < count; i++) { - result += char; - } - return result; - } } public getBreakpointStatementLocation(pos: number) { @@ -2055,7 +2047,7 @@ namespace FourSlash { for (let i = 0; i < length; i++) { const item = items[i]; - Harness.IO.log(`name: ${item.text}, kind: ${item.kind}`); + Harness.IO.log(`${repeatString(item.indent, " ")}name: ${item.text}, kind: ${item.kind}, childItems: ${item.childItems.map(child => child.text)}`); } } @@ -2742,6 +2734,14 @@ ${code} fileName: fileName }; } + + function repeatString(count: number, char: string) { + let result = ""; + for (let i = 0; i < count; i++) { + result += char; + } + return result; + } } namespace FourSlashInterface { diff --git a/src/services/navigationBar.ts b/src/services/navigationBar.ts index cb81c398cb8..2896031eb96 100644 --- a/src/services/navigationBar.ts +++ b/src/services/navigationBar.ts @@ -320,6 +320,9 @@ namespace ts.NavigationBar { case SyntaxKind.EnumMember: return createItem(node, getTextOfNode((node).name), ts.ScriptElementKind.memberVariableElement); + case SyntaxKind.InterfaceDeclaration: + return createItem(node, getTextOfNode((node).name), ts.ScriptElementKind.interfaceElement); + case SyntaxKind.CallSignature: return createItem(node, "()", ts.ScriptElementKind.callSignatureElement); diff --git a/tests/baselines/reference/classAndInterfaceMergeConflictingMembers.errors.txt b/tests/baselines/reference/classAndInterfaceMergeConflictingMembers.errors.txt index a28471a3f91..8b3fa5bba55 100644 --- a/tests/baselines/reference/classAndInterfaceMergeConflictingMembers.errors.txt +++ b/tests/baselines/reference/classAndInterfaceMergeConflictingMembers.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflictingMembers.ts(10,15): error TS2686: All declarations of 'x' must have identical modifiers. -tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflictingMembers.ts(14,5): error TS2686: All declarations of 'x' must have identical modifiers. -tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflictingMembers.ts(18,13): error TS2686: All declarations of 'x' must have identical modifiers. -tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflictingMembers.ts(22,5): error TS2686: All declarations of 'x' must have identical modifiers. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflictingMembers.ts(10,15): error TS2687: All declarations of 'x' must have identical modifiers. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflictingMembers.ts(14,5): error TS2687: All declarations of 'x' must have identical modifiers. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflictingMembers.ts(18,13): error TS2687: All declarations of 'x' must have identical modifiers. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflictingMembers.ts(22,5): error TS2687: All declarations of 'x' must have identical modifiers. ==== tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflictingMembers.ts (4 errors) ==== @@ -16,23 +16,23 @@ tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflict declare class C2 { protected x : number; ~ -!!! error TS2686: All declarations of 'x' must have identical modifiers. +!!! error TS2687: All declarations of 'x' must have identical modifiers. } interface C2 { x : number; ~ -!!! error TS2686: All declarations of 'x' must have identical modifiers. +!!! error TS2687: All declarations of 'x' must have identical modifiers. } declare class C3 { private x : number; ~ -!!! error TS2686: All declarations of 'x' must have identical modifiers. +!!! error TS2687: All declarations of 'x' must have identical modifiers. } interface C3 { x : number; ~ -!!! error TS2686: All declarations of 'x' must have identical modifiers. +!!! error TS2687: All declarations of 'x' must have identical modifiers. } \ No newline at end of file diff --git a/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt b/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt index 1bc487189d3..78ef601af23 100644 --- a/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt +++ b/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt @@ -1,8 +1,11 @@ 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,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(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 TS2686: All declarations of 'x' must have identical modifiers. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(10,24): error TS2686: All declarations of 'x' must have identical modifiers. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(9,25): error TS2687: All declarations of 'x' must have identical modifiers. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(10,24): error TS2300: Duplicate identifier 'x'. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(10,24): error TS2687: All declarations of 'x' must have identical modifiers. 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. @@ -14,7 +17,7 @@ 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 (14 errors) ==== +==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts (17 errors) ==== // Parameter properties are not valid in overloads of constructors class C { @@ -24,6 +27,10 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatur ~~~~~~~~~ !!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(public x, private y) { } + ~ +!!! error TS2300: Duplicate identifier 'x'. + ~ +!!! error TS2300: Duplicate identifier 'y'. } class C2 { @@ -31,10 +38,12 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatur ~~~~~~~~~ !!! error TS2369: A parameter property is only allowed in a constructor implementation. ~ -!!! error TS2686: All declarations of 'x' must have identical modifiers. +!!! error TS2687: All declarations of 'x' must have identical modifiers. constructor(public x) { } ~ -!!! error TS2686: All declarations of 'x' must have identical modifiers. +!!! error TS2300: Duplicate identifier 'x'. + ~ +!!! error TS2687: All declarations of 'x' must have identical modifiers. } class C3 { diff --git a/tests/baselines/reference/constructorParameterProperties2.errors.txt b/tests/baselines/reference/constructorParameterProperties2.errors.txt index 409660c3133..7058b39bcca 100644 --- a/tests/baselines/reference/constructorParameterProperties2.errors.txt +++ b/tests/baselines/reference/constructorParameterProperties2.errors.txt @@ -1,10 +1,10 @@ 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 TS2686: All declarations of 'y' must have identical modifiers. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(18,5): error TS2687: All declarations of 'y' must have identical modifiers. tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(19,25): error TS2300: Duplicate identifier 'y'. -tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(19,25): error TS2686: All declarations of 'y' must have identical modifiers. -tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(26,5): error TS2686: All declarations of 'y' must have identical modifiers. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(19,25): error TS2687: All declarations of 'y' must have identical modifiers. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(26,5): error TS2687: All declarations of 'y' must have identical modifiers. tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(27,27): error TS2300: Duplicate identifier 'y'. -tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(27,27): error TS2686: All declarations of 'y' must have identical modifiers. +tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(27,27): error TS2687: All declarations of 'y' must have identical modifiers. ==== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts (7 errors) ==== @@ -29,12 +29,12 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co class E { y: number; ~ -!!! error TS2686: All declarations of 'y' must have identical modifiers. +!!! error TS2687: All declarations of 'y' must have identical modifiers. constructor(private y: number) { } // error ~ !!! error TS2300: Duplicate identifier 'y'. ~ -!!! error TS2686: All declarations of 'y' must have identical modifiers. +!!! error TS2687: All declarations of 'y' must have identical modifiers. } var e: E; @@ -43,12 +43,12 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co class F { y: number; ~ -!!! error TS2686: All declarations of 'y' must have identical modifiers. +!!! error TS2687: All declarations of 'y' must have identical modifiers. constructor(protected y: number) { } // error ~ !!! error TS2300: Duplicate identifier 'y'. ~ -!!! error TS2686: All declarations of 'y' must have identical modifiers. +!!! error TS2687: All declarations of 'y' must have identical modifiers. } var f: F; diff --git a/tests/baselines/reference/duplicateIdentifierComputedName.errors.txt b/tests/baselines/reference/duplicateIdentifierComputedName.errors.txt index faef1106c41..12d70ca5458 100644 --- a/tests/baselines/reference/duplicateIdentifierComputedName.errors.txt +++ b/tests/baselines/reference/duplicateIdentifierComputedName.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/duplicateIdentifierComputedName.ts(3,5): error TS2300: Duplicate identifier 'a'. +tests/cases/compiler/duplicateIdentifierComputedName.ts(3,5): error TS2300: Duplicate identifier '["a"]'. ==== tests/cases/compiler/duplicateIdentifierComputedName.ts (1 errors) ==== @@ -6,6 +6,6 @@ tests/cases/compiler/duplicateIdentifierComputedName.ts(3,5): error TS2300: Dupl ["a"]: string; ["a"]: string; ~~~~~ -!!! error TS2300: Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier '["a"]'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateIdentifierDifferentModifiers.errors.txt b/tests/baselines/reference/duplicateIdentifierDifferentModifiers.errors.txt index c25609bfa42..efb10e3d399 100644 --- a/tests/baselines/reference/duplicateIdentifierDifferentModifiers.errors.txt +++ b/tests/baselines/reference/duplicateIdentifierDifferentModifiers.errors.txt @@ -1,17 +1,17 @@ -tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts(2,15): error TS2686: All declarations of 'x' must have identical modifiers. -tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts(3,15): error TS2686: All declarations of 'x' must have identical modifiers. -tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts(16,11): error TS2686: All declarations of 'y' must have identical modifiers. -tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts(20,3): error TS2686: All declarations of 'y' must have identical modifiers. +tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts(2,15): error TS2687: All declarations of 'x' must have identical modifiers. +tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts(3,15): error TS2687: All declarations of 'x' must have identical modifiers. +tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts(16,11): error TS2687: All declarations of 'y' must have identical modifiers. +tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts(20,3): error TS2687: All declarations of 'y' must have identical modifiers. ==== tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts (4 errors) ==== // Not OK interface B { x; } ~ -!!! error TS2686: All declarations of 'x' must have identical modifiers. +!!! error TS2687: All declarations of 'x' must have identical modifiers. interface B { x?; } ~ -!!! error TS2686: All declarations of 'x' must have identical modifiers. +!!! error TS2687: All declarations of 'x' must have identical modifiers. // OK class A { @@ -26,12 +26,12 @@ tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts(20,3): error TS268 class C { private y: string; ~ -!!! error TS2686: All declarations of 'y' must have identical modifiers. +!!! error TS2687: All declarations of 'y' must have identical modifiers. } interface C { y: string; ~ -!!! error TS2686: All declarations of 'y' must have identical modifiers. +!!! error TS2687: All declarations of 'y' must have identical modifiers. } \ No newline at end of file diff --git a/tests/baselines/reference/numericClassMembers1.errors.txt b/tests/baselines/reference/numericClassMembers1.errors.txt index 7c99932e937..28c06a6fcf5 100644 --- a/tests/baselines/reference/numericClassMembers1.errors.txt +++ b/tests/baselines/reference/numericClassMembers1.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/numericClassMembers1.ts(3,3): error TS2300: Duplicate identifier '0'. -tests/cases/compiler/numericClassMembers1.ts(8,2): error TS2300: Duplicate identifier '0'. +tests/cases/compiler/numericClassMembers1.ts(3,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) ==== @@ -7,14 +7,14 @@ tests/cases/compiler/numericClassMembers1.ts(8,2): error TS2300: Duplicate ident 0 = 1; 0.0 = 2; ~~~ -!!! error TS2300: Duplicate identifier '0'. +!!! error TS2300: Duplicate identifier '0.0'. } class C235 { 0.0 = 1; '0' = 2; ~~~ -!!! error TS2300: Duplicate identifier '0'. +!!! error TS2300: Duplicate identifier ''0''. } class C236 { diff --git a/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt b/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt index 24801f2847a..5fb05297f11 100644 --- a/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt +++ b/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(3,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(9,5): error TS2300: Duplicate identifier '2'. tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(10,5): error TS2300: Duplicate identifier '2'. @@ -12,7 +12,7 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedP 1: number; 1.0: number; ~~~ -!!! error TS2300: Duplicate identifier '1'. +!!! error TS2300: Duplicate identifier '1.0'. static 2: number; static 2: number; ~ diff --git a/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt b/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt index 359a45ded51..102a6a07836 100644 --- a/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt +++ b/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts(6,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'. @@ -15,7 +15,7 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericString "1.0": number; // not a duplicate 1.0: number; ~~~ -!!! error TS2300: Duplicate identifier '1'. +!!! error TS2300: Duplicate identifier '1.0'. } interface I { diff --git a/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt b/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt index 0565bf884e0..80931650d0a 100644 --- a/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt +++ b/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(6,5): error TS2300: Duplicate identifier '1'. -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'. +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'. tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(14,5): error TS2300: Duplicate identifier '1'. @@ -22,13 +22,13 @@ tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts( 1; 1.0; ~~~ -!!! error TS2300: Duplicate identifier '1'. +!!! error TS2300: Duplicate identifier '1.0'. 1.; ~~ -!!! error TS2300: Duplicate identifier '1'. +!!! error TS2300: Duplicate identifier '1.'. 1.00; ~~~~ -!!! error TS2300: Duplicate identifier '1'. +!!! error TS2300: Duplicate identifier '1.00'. } interface I { diff --git a/tests/baselines/reference/optionalPropertiesSyntax.errors.txt b/tests/baselines/reference/optionalPropertiesSyntax.errors.txt index 51e49e048d5..e7cc8742127 100644 --- a/tests/baselines/reference/optionalPropertiesSyntax.errors.txt +++ b/tests/baselines/reference/optionalPropertiesSyntax.errors.txt @@ -5,9 +5,9 @@ tests/cases/compiler/optionalPropertiesSyntax.ts(12,5): error TS1131: Property o tests/cases/compiler/optionalPropertiesSyntax.ts(18,11): error TS1005: ';' expected. tests/cases/compiler/optionalPropertiesSyntax.ts(18,12): error TS1131: Property or signature expected. tests/cases/compiler/optionalPropertiesSyntax.ts(24,5): error TS2300: Duplicate identifier 'prop'. -tests/cases/compiler/optionalPropertiesSyntax.ts(24,5): error TS2686: All declarations of 'prop' must have identical modifiers. +tests/cases/compiler/optionalPropertiesSyntax.ts(24,5): error TS2687: All declarations of 'prop' must have identical modifiers. tests/cases/compiler/optionalPropertiesSyntax.ts(25,5): error TS2300: Duplicate identifier 'prop'. -tests/cases/compiler/optionalPropertiesSyntax.ts(25,5): error TS2686: All declarations of 'prop' must have identical modifiers. +tests/cases/compiler/optionalPropertiesSyntax.ts(25,5): error TS2687: All declarations of 'prop' must have identical modifiers. tests/cases/compiler/optionalPropertiesSyntax.ts(32,5): error TS2375: Duplicate number index signature. tests/cases/compiler/optionalPropertiesSyntax.ts(32,18): error TS1005: ';' expected. tests/cases/compiler/optionalPropertiesSyntax.ts(32,19): error TS1131: Property or signature expected. @@ -56,12 +56,12 @@ tests/cases/compiler/optionalPropertiesSyntax.ts(34,5): error TS2375: Duplicate ~~~~ !!! error TS2300: Duplicate identifier 'prop'. ~~~~ -!!! error TS2686: All declarations of 'prop' must have identical modifiers. +!!! error TS2687: All declarations of 'prop' must have identical modifiers. prop?: any; ~~~~ !!! error TS2300: Duplicate identifier 'prop'. ~~~~ -!!! error TS2686: All declarations of 'prop' must have identical modifiers. +!!! error TS2687: All declarations of 'prop' must have identical modifiers. prop2?: any; } diff --git a/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt b/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt index a99db2a39ad..d1a0513c1f6 100644 --- a/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt +++ b/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt @@ -1,8 +1,9 @@ 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 (2 errors) ==== +==== tests/cases/compiler/parameterPropertyInConstructor2.ts (3 errors) ==== module mod { class Customers { constructor(public names: string); @@ -11,6 +12,8 @@ tests/cases/compiler/parameterPropertyInConstructor2.ts(3,17): error TS2369: A p ~~~~~~~~~~~~~~~~~~~~ !!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(public names: string, public ages: number) { + ~~~~~ +!!! error TS2300: Duplicate identifier 'names'. } } } diff --git a/tests/baselines/reference/stringNamedPropertyDuplicates.errors.txt b/tests/baselines/reference/stringNamedPropertyDuplicates.errors.txt index f6ae46d9b28..5bd8a2771ba 100644 --- a/tests/baselines/reference/stringNamedPropertyDuplicates.errors.txt +++ b/tests/baselines/reference/stringNamedPropertyDuplicates.errors.txt @@ -1,5 +1,5 @@ -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(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(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'. @@ -12,11 +12,11 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/stringNamedPr "a b": number; "a b": number; ~~~~~ -!!! error TS2300: Duplicate identifier 'a b'. +!!! error TS2300: Duplicate identifier '"a b"'. static "c d": number; static "c d": number; ~~~~~ -!!! error TS2300: Duplicate identifier 'c d'. +!!! error TS2300: Duplicate identifier '"c d"'. } interface I { diff --git a/tests/baselines/reference/symbolProperty44.errors.txt b/tests/baselines/reference/symbolProperty44.errors.txt index 984a20e9974..2cef480e736 100644 --- a/tests/baselines/reference/symbolProperty44.errors.txt +++ b/tests/baselines/reference/symbolProperty44.errors.txt @@ -1,9 +1,8 @@ tests/cases/conformance/es6/Symbols/symbolProperty44.ts(2,9): error TS2300: Duplicate identifier '[Symbol.hasInstance]'. tests/cases/conformance/es6/Symbols/symbolProperty44.ts(5,9): error TS2300: Duplicate identifier '[Symbol.hasInstance]'. -tests/cases/conformance/es6/Symbols/symbolProperty44.ts(5,9): error TS2300: Duplicate identifier '__@hasInstance'. -==== tests/cases/conformance/es6/Symbols/symbolProperty44.ts (3 errors) ==== +==== tests/cases/conformance/es6/Symbols/symbolProperty44.ts (2 errors) ==== class C { get [Symbol.hasInstance]() { ~~~~~~~~~~~~~~~~~~~~ @@ -13,8 +12,6 @@ tests/cases/conformance/es6/Symbols/symbolProperty44.ts(5,9): error TS2300: Dupl get [Symbol.hasInstance]() { ~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '[Symbol.hasInstance]'. - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2300: Duplicate identifier '__@hasInstance'. return ""; } } \ No newline at end of file diff --git a/tests/cases/fourslash/navigationBarItemsInsideMethodsAndConstructors.ts b/tests/cases/fourslash/navigationBarItemsInsideMethodsAndConstructors.ts index 89b05dc6b07..d6fb0a91eb2 100644 --- a/tests/cases/fourslash/navigationBarItemsInsideMethodsAndConstructors.ts +++ b/tests/cases/fourslash/navigationBarItemsInsideMethodsAndConstructors.ts @@ -6,7 +6,7 @@ //// //// } //// -//// {| "itemName": "LocalInterfaceInConstrcutor", "kind": "interface", "parentName": ""|}interface LocalInterfaceInConstrcutor { +//// {| "itemName": "LocalInterfaceInConstrcutor", "kind": "interface", "parentName": "constructor"|}interface LocalInterfaceInConstrcutor { //// } //// //// {| "itemName": "LocalEnumInConstructor", "kind": "enum", "parentName": "constructor"|}enum LocalEnumInConstructor { @@ -21,7 +21,7 @@ //// } //// } //// -//// {| "itemName": "LocalInterfaceInMethod", "kind": "interface", "parentName": ""|}interface LocalInterfaceInMethod { +//// {| "itemName": "LocalInterfaceInMethod", "kind": "interface", "parentName": "method"|}interface LocalInterfaceInMethod { //// } //// //// {| "itemName": "LocalEnumInMethod", "kind": "enum", "parentName": "method"|}enum LocalEnumInMethod { @@ -39,4 +39,4 @@ test.markers().forEach((marker) => { }); // no other items -verify.navigationBarCount(19); +verify.navigationBarCount(21); diff --git a/tests/cases/fourslash/navigationBarItemsItems.ts b/tests/cases/fourslash/navigationBarItemsItems.ts index 5cae68b1194..d9ae3d35dff 100644 --- a/tests/cases/fourslash/navigationBarItemsItems.ts +++ b/tests/cases/fourslash/navigationBarItemsItems.ts @@ -1,7 +1,7 @@ /// ////// Interface -////{| "itemName": "IPoint", "kind": "interface", "parentName": "" |}interface IPoint { +////{| "itemName": "IPoint", "kind": "interface", "parentName": "" |}interface IPoint { //// {| "itemName": "getDist", "kind": "method", "parentName": "IPoint" |}getDist(): number; //// {| "itemName": "new()", "kind": "construct", "parentName": "IPoint" |}new(): IPoint; //// {| "itemName": "()", "kind": "call", "parentName": "IPoint" |}(): any; @@ -49,4 +49,4 @@ test.markers().forEach((marker) => { } }); -verify.navigationBarCount(24); +verify.navigationBarCount(25); diff --git a/tests/cases/fourslash/navigationBarItemsMultilineStringIdentifiers.ts b/tests/cases/fourslash/navigationBarItemsMultilineStringIdentifiers.ts index 8856c4c044a..f779c7a0580 100644 --- a/tests/cases/fourslash/navigationBarItemsMultilineStringIdentifiers.ts +++ b/tests/cases/fourslash/navigationBarItemsMultilineStringIdentifiers.ts @@ -10,7 +10,7 @@ ////{| "itemName": "\"MultilineMadness\"", "kind": "module" |} ////declare module "MultilineMadness" {} //// -////{| "itemName": "Foo", "kind": "interface" |} +////{| "itemName": "Foo", "kind": "interface", "parentName": "" |} ////interface Foo { //// {| "itemName": "\"a1\\\\\\r\\nb\"", "kind": "property", "parentName": "Foo" |} //// "a1\\\r\nb"; @@ -38,4 +38,4 @@ test.markers().forEach((marker) => { verify.navigationBarContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName); }); -verify.navigationBarCount(9); // interface w/ 2 properties, class w/ 2 properties, 3 modules \ No newline at end of file +verify.navigationBarCount(11); // interface w/ 2 properties, class w/ 2 properties, 3 modules \ No newline at end of file diff --git a/tests/cases/fourslash/navigationBarItemsSymbols2.ts b/tests/cases/fourslash/navigationBarItemsSymbols2.ts index 579a6353c13..5c398f77bbd 100644 --- a/tests/cases/fourslash/navigationBarItemsSymbols2.ts +++ b/tests/cases/fourslash/navigationBarItemsSymbols2.ts @@ -1,6 +1,6 @@ /// -////{| "itemName": "I", "kind": "interface", "parentName": "" |} +////{| "itemName": "I", "kind": "interface", "parentName": "" |} ////interface I { //// {| "itemName": "[Symbol.isRegExp]", "kind": "property", "parentName": "I" |} //// [Symbol.isRegExp]: string; @@ -12,4 +12,5 @@ test.markers().forEach(marker => { verify.navigationBarContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName); }); -verify.navigationBarCount(test.markers().length); \ No newline at end of file +// 2 are not marked: and its child. +verify.navigationBarCount(2 + test.markers().length); \ No newline at end of file diff --git a/tests/cases/fourslash/server/navbar01.ts b/tests/cases/fourslash/server/navbar01.ts index e4e2b699be5..05e92c2835f 100644 --- a/tests/cases/fourslash/server/navbar01.ts +++ b/tests/cases/fourslash/server/navbar01.ts @@ -1,7 +1,7 @@ /// ////// Interface -////{| "itemName": "IPoint", "kind": "interface", "parentName": "" |}interface IPoint { +////{| "itemName": "IPoint", "kind": "interface", "parentName": "" |}interface IPoint { //// {| "itemName": "getDist", "kind": "method", "parentName": "IPoint" |}getDist(): number; //// {| "itemName": "new()", "kind": "construct", "parentName": "IPoint" |}new(): IPoint; //// {| "itemName": "()", "kind": "call", "parentName": "IPoint" |}(): any; @@ -49,4 +49,4 @@ test.markers().forEach((marker) => { } }); -verify.navigationBarCount(24); +verify.navigationBarCount(25);