-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[[FIX]] Correct implementation of spread/rest
Previously, the spread/rest operator was implemented as a "prefix" operator. This incorrectly enabled its use in generic expression contexts, as in: ...x; Re-implement as an "infix" operator and implement a helper function for parsing it in only those contexts where it is valid: - parameter lists - call expressions - array initializers - destructuring element patterns This change triggers failures in a number of Test262 tests that were previously interpreted as "valid." These tests concern the "object spread/rest" proposal, but support for this proposal has not yet been implemented in JSHint. Therefor, their previous "passing" status was circumstantial, and the newly-identified error should be marked as "expected."
- Loading branch information
1 parent
5ca8b1a
commit bd0ae0d
Showing
3 changed files
with
402 additions
and
649 deletions.
There are no files selected for viewing
This file contains 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
Oops, something went wrong.