Skip to content

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
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
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.

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

4 participants