mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-09 20:51:43 -06:00
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:
commit
d9657b4368
@ -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);
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
////function f(): string & {(): any} {
|
||||
//// return <any>{};
|
||||
////}
|
||||
////let x = f();
|
||||
////x/**/();
|
||||
|
||||
goTo.marker();
|
||||
verify.quickInfoIs("let x: () => any");
|
||||
Loading…
x
Reference in New Issue
Block a user