ericmckean / traceur-compiler

Automatically exported from code.google.com/p/traceur-compiler
Apache License 2.0
0 stars 0 forks source link

Array destructuring executes the expression twice #193

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Given:

var [x = 42] = ([].concat(1));

Generates:

var x = 0 in ([].concat(1)) ? ([].concat(1))[0]: 42;

We need to introduce a temp variable here.

Original issue reported on code.google.com by arv@chromium.org on 31 Jan 2013 at 12:15

GoogleCodeExporter commented 9 years ago
https://code.google.com/p/traceur-compiler/source/detail?r=69a46675151c315dcccf7
11e6f31bf060d190899

Original comment by arv@google.com on 7 Feb 2013 at 9:24