-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Test case:
var p = [];
var [a,b] = Object(...p);
Partial output:
// .... Snip....
var p = [];
var a = (b = Object.apply(null, ITER$0(p))[0], b = b[1]);
As you can see from the output, the initializer for a is wrapped in parenthesis, which causes b = b[1]
to not be part of the var
declaration, thus, b
is never defined.
Side question: what is the reasoning behind doing the destructoring this way instead of similar to how traceur does it with a temporary?
var p = [];
var $__27 = Object.apply(null, $traceurRuntime.spread(p)),
a = $__27[0],
b = $__27[1];
Metadata
Metadata
Assignees
Labels
No labels