diff --git a/src/services/services.ts b/src/services/services.ts index af61e342a8e..8b4986e8ba4 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -2843,7 +2843,8 @@ module ts { if (signatureDeclaration.kind === SyntaxKind.ConstructSignature) { displayParts.push(keywordPart(SyntaxKind.NewKeyword)); displayParts.push(spacePart()); - } else if (signatureDeclaration.kind !== SyntaxKind.CallSignature) { + } + else if (signatureDeclaration.kind !== SyntaxKind.CallSignature && signatureDeclaration.name) { displayParts.push.apply(displayParts, symbolToDisplayParts(typeResolver, signatureDeclaration.symbol, sourceFile, /*meaning*/ undefined, SymbolFormatFlags.WriteTypeParametersOrArguments)) } displayParts.push.apply(displayParts, signatureToDisplayParts(typeResolver, signature, sourceFile, TypeFormatFlags.NoTruncation | TypeFormatFlags.WriteTypeArgumentsOfSignature)); diff --git a/tests/cases/fourslash_old/completionBeforeSemanticDiagnosticsInArrowFunction1.ts b/tests/cases/fourslash/completionBeforeSemanticDiagnosticsInArrowFunction1.ts similarity index 80% rename from tests/cases/fourslash_old/completionBeforeSemanticDiagnosticsInArrowFunction1.ts rename to tests/cases/fourslash/completionBeforeSemanticDiagnosticsInArrowFunction1.ts index b5475fe263f..bc0aa713880 100644 --- a/tests/cases/fourslash_old/completionBeforeSemanticDiagnosticsInArrowFunction1.ts +++ b/tests/cases/fourslash/completionBeforeSemanticDiagnosticsInArrowFunction1.ts @@ -15,7 +15,7 @@ fs.edit.insert("A"); // Bring up completion to force a pull resolve. This will end up resolving several symbols and // producing unreported diagnostics (i.e. that 'V' wasn't found). fs.verify.completionListContains("T"); -fs.verify.completionEntryDetailIs("T", "T in (x: T): void"); +fs.verify.completionEntryDetailIs("T", "(type parameter) T in (x: any): void"); // There should now be a single error. fs.verify.numberOfErrorsInCurrentFile(1); \ No newline at end of file