Skip to content
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

Use symbolToTypeNode for class & interface references #24330

Merged

Conversation

weswigham
Copy link
Member

@weswigham weswigham commented May 22, 2018

Fixes #24287

Non-alias class and interface references were still using symbolToName, which drops the module symbol. With this change they now also use symbolToTypeNode, bringing them inline with aliases and everything else (symbolToName is still used for property names). Once fixed, this exposed an issue that showed that we weren't calculating visibility chains for merged globals within their containing ambient global augmentation correctly (they had just been defaulting to unqualified in baselines because the top of the chain was always elided), and fixing that issue (which meant accounting for merged symbols and exportSymbols in trySymbolTable) happened to improve a bunch of our symbol baselines to correctly see/use their own name, rather than falling back to some alias or qualification in scope.

@weswigham weswigham requested a review from mhegazy May 22, 2018 20:17
@mhegazy
Copy link
Contributor

mhegazy commented May 22, 2018

Please port to release-2.9

@weswigham weswigham merged commit 3fe946d into microsoft:master May 22, 2018
@weswigham weswigham deleted the stop-using-symboltoname-for-refs branch May 22, 2018 21:18
weswigham added a commit to weswigham/TypeScript that referenced this pull request May 22, 2018
* Use merged symbols when calculating qualification, use symbolToTypeNode

* Accept baselines
weswigham added a commit that referenced this pull request May 22, 2018
* Use merged symbols when calculating qualification, use symbolToTypeNode

* Accept baselines
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
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.

The TS4023-TS6133 Paradox (noUnusedLocals)
2 participants