Uh oh!
There was an error while loading. Please reload this page.
Omit only class methods from object spreads - #13365
Merged
Nathan Shively-Sanders (sandersn) merged 2 commits intoJan 9, 2017
Merged
Omit only class methods from object spreads#13365Nathan Shively-Sanders (sandersn) merged 2 commits into
Nathan Shively-Sanders (sandersn) merged 2 commits into
Conversation
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.
Mohamed Hegazy (mhegazy)
approved these changes
Jan 9, 2017
Nathan Shively-Sanders (sandersn)
deleted the
object-spread-removes-class-methods
branch
January 9, 2017 19:10
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.