Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Improve excess property check error span for spread property#16530

Merged
sandersn merged 4 commits into
mastermicrosoft/TypeScript:masterfrom
excess-property-check-error-span-for-spread-propertymicrosoft/TypeScript:excess-property-check-error-span-for-spread-propertyCopy head branch name to clipboard
Jun 14, 2017
Merged

Improve excess property check error span for spread property#16530
sandersn merged 4 commits into
mastermicrosoft/TypeScript:masterfrom
excess-property-check-error-span-for-spread-propertymicrosoft/TypeScript:excess-property-check-error-span-for-spread-propertyCopy head branch name to clipboard

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

mhegazy commented Jun 14, 2017

Copy link
Copy Markdown
Contributor

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.