[es6] enable destructuring rest parameters
Originally, only BindingIdentifiers were a legal operand for the `...` ellipsis in a function rest parameter. This has since changed, allowing the rest array to be destructured. The grammar is now the following: ``` FunctionRestParameter[Yield]: BindingRestElement[?Yield] BindingRestElement[Yield]: ... BindingIdentifier[?Yield] ... BindingPattern[?Yield] ``` *Spec change: https://github.com/tc39/ecma262/commit/d322357e6be95bc4bd3e03f5944a736aac55fa50 *TC39 Discussion: https://github.com/tc39/tc39-notes/blob/master/es7/2015-07/july-28.md#66-bindingrestelement-should-allow-a-bindingpattern-ala-assignmentrestelement BUG=v8:4627, v8:2159 LOG=N R=littledan@chromium.org, adamk@chromium.org, wingo@igalia.com, rossberg@chromium.org Review URL: https://codereview.chromium.org/1532873004 Cr-Commit-Position: refs/heads/master@{#33192}
Showing
Please
register
or
sign in
to comment