Skip to content

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

Merged
1 commit merged intomasterfrom
intersection_quick_info
May 12, 2016
Merged

Fix #7966: A non-anonymous type can still fail to have a symbol.#8576
1 commit merged intomasterfrom
intersection_quick_info

Conversation

@ghost
Copy link
Copy Markdown

@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
Copy Markdown

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;

displayParts.push(spacePart());
}
if (!(type.flags & TypeFlags.Anonymous)) {
if (!(type.flags & TypeFlags.Anonymous) && type.symbol) {
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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