Skip to content

Fix binding of this-assignments w/computed properties #35639

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
merged 1 commit into from
Dec 11, 2019

Conversation

sandersn
Copy link
Member

Binding of top-level this-assignments forgets to check for computed properties and tries to bind them normally. Then it hits a helpful assert which prevents that.

This change stops binding this-properties with computed properties at the top-level. There's nothing sensible we could do with them; we're unable to late-bind entries to the global scope or to modules.

Fixes #35630

Top-level this-assignments do not support computed properties. But the
binder forgets to check for computed properties and tries to bind them
normally. This hits a helpful assert.

This change stop binding this-properties with computed properties at the
top-level.  There's nothing sensible we could do with them; we're unable
to late-bind entries to the global scope or to modules.
@sandersn sandersn merged commit b98cb06 into master Dec 11, 2019
@sandersn
Copy link
Member Author

@typescript-bot cherry-pick this to release-3.7

@typescript-bot
Copy link
Collaborator

Hey @sandersn, I've opened #35640 for you.

typescript-bot pushed a commit to typescript-bot/TypeScript that referenced this pull request Dec 11, 2019
Component commits:
7c31be3 Fix binding of this-assignments w/computed properties
Top-level this-assignments do not support computed properties. But the
binder forgets to check for computed properties and tries to bind them
normally. This hits a helpful assert.

This change stop binding this-properties with computed properties at the
top-level.  There's nothing sensible we could do with them; we're unable
to late-bind entries to the global scope or to modules.
sandersn pushed a commit that referenced this pull request Dec 12, 2019
Component commits:
7c31be3 Fix binding of this-assignments w/computed properties
Top-level this-assignments do not support computed properties. But the
binder forgets to check for computed properties and tries to bind them
normally. This hits a helpful assert.

This change stop binding this-properties with computed properties at the
top-level.  There's nothing sensible we could do with them; we're unable
to late-bind entries to the global scope or to modules.
@sandersn sandersn deleted the fix-binding-this-computed-property-assignment branch December 12, 2019 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VS tsserver crash in openExternalProjects: Error processing request. Debug Failure. False expression.
3 participants