Open gabejohnson opened 7 years ago
[...a, ] = b; [, x, ...y,] = 0; // and [...{a=0},]=0;
should all throw with Uncaught SyntaxError: Rest element must be last element. The issue is w/ transformDestructuring which tries to take a SpreadElement and transform it into a RestElement.
Uncaught SyntaxError: Rest element must be last element
SpreadElement
RestElement
I'd like to take the tack suggested in https://github.com/sweet-js/sweet-core/pull/650#issuecomment-288863584
650 fixed issues w/ destructuring assignments in declarations. However, these forms
should all throw with
Uncaught SyntaxError: Rest element must be last element
. The issue is w/ transformDestructuring which tries to take aSpreadElement
and transform it into aRestElement
.I'd like to take the tack suggested in https://github.com/sweet-js/sweet-core/pull/650#issuecomment-288863584