Merge pull request #8576 from Microsoft/intersection_quick_info

Fix #7966: A non-anonymous type can still fail to have a symbol.
This commit is contained in:
Andy
2016-05-12 10:35:41 -07:00
2 changed files with 9 additions and 1 deletions

View File

@@ -4349,7 +4349,7 @@ namespace ts {
displayParts.push(keywordPart(SyntaxKind.NewKeyword));
displayParts.push(spacePart());
}
if (!(type.flags & TypeFlags.Anonymous)) {
if (!(type.flags & TypeFlags.Anonymous) && type.symbol) {
addRange(displayParts, symbolToDisplayParts(typeChecker, type.symbol, enclosingDeclaration, /*meaning*/ undefined, SymbolFormatFlags.WriteTypeParametersOrArguments));
}
addSignatureDisplayParts(signature, allSignatures, TypeFormatFlags.WriteArrowStyleSignature);