Skip to content

Fix #7966: A non-anonymous type can still fail to have a symbol. #8576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
1 commit merged into from
May 12, 2016

Conversation

ghost
Copy link

@ghost ghost commented May 12, 2016

Fixes #7966.

…example, an intersection type.

(We still need the check for the Anonymous flags or else anonymous function tooltips will look like `var lambdaFoo: (Anonymous function)(a: number, b: number) => number'` instead of `var lambdaFoo: (a: number, b: number) => number`)
@msftclas
Copy link

Hi @Andy-MS, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (Andy Hanson). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

@@ -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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just if (type.symbol)?

Copy link
Author

@ghost ghost May 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we allow anything with .symbol, anonymous function tooltips will look like var lambdaFoo: (Anonymous function)(a: number, b: number) => number instead of var lambdaFoo: (a: number, b: number) => number.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see.

@mhegazy
Copy link
Contributor

mhegazy commented May 12, 2016

👍

@ghost ghost merged commit d9657b4 into master May 12, 2016
@ghost ghost deleted the intersection_quick_info branch May 12, 2016 17:35
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants