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

Omit only class methods from object spreads #13365

Merged
merged 2 commits into from
Jan 9, 2017

Conversation

sandersn
Copy link
Member

@sandersn sandersn commented Jan 9, 2017

Omit class methods from spreads. Others stay.

Fixes #13148 (though the other half of the bug is addressed by #13288, which fixes the type of Object.assign)

Previously, all methods were omitted except those from the object literal
that contained the spread. This gets rid of the ugly third argument to
getSpreadType.

It also fixes a bug that arose from removing the spread type late in the
development of object spread; methods from the left-hand-side of a
multi-spread object literal were not removed. The spread type code
normalised spreads so the left-hand is never an object, but that code was
removed.

Previously, all methods were omitted except those from the object literal
that contained the spread. This gets rid of the ugly third argument to
`getSpreadType`.

It also fixes a bug that arose from removing the spread type late in the
development of object spread; methods from the left-hand-side of a
multi-spread object literal were not removed. The spread type code
normalised spreads so the left-hand is never an object, but that code was
removed.
Test that
1. Only class methods get removed
2. Methods from both left and right get removed.
@sandersn sandersn merged commit e4dcd08 into master Jan 9, 2017
@sandersn sandersn deleted the object-spread-removes-class-methods branch January 9, 2017 19:10
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 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.

Object spread and enumerable properties
3 participants