Skip to content

Improve excess property check error span for spread property#16530

Merged
sandersn merged 4 commits into
masterfrom
excess-property-check-error-span-for-spread-property
Jun 14, 2017
Merged

Improve excess property check error span for spread property#16530
sandersn merged 4 commits into
masterfrom
excess-property-check-error-span-for-spread-property

Conversation

@sandersn
Copy link
Copy Markdown
Member

Fall back to the assignment's declaration; don't use the property's valueDeclaration because that is not useful when the property comes from a spread. The fallback now happens when the property's valueDeclaration does not have the object literal's first declaration as an ancestor.

Fixes #16473

sandersn added 3 commits June 14, 2017 11:26
Fall back to the assignment's declaration; don't use the property's
valueDeclaration because that is not useful when the property comes from
a spread. The fallback now happens when the property's valueDeclaration
does not have the object literal's valueDeclaration as an ancestor.
valueDeclaration is frequently not set
@DanielRosenwasser
Copy link
Copy Markdown
Member

Seems pretty reasonable, but leave a comment in the code on what would happen if you weren't doing this check. 👍

@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Jun 14, 2017

Please port to release-2.4

@sandersn sandersn merged commit 26ab0cd into master Jun 14, 2017
@sandersn sandersn deleted the excess-property-check-error-span-for-spread-property branch June 14, 2017 23:16
@sandersn
Copy link
Copy Markdown
Member Author

Ported to release-2.4

@mohsen1 mohsen1 mentioned this pull request Jun 24, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 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.

4 participants