babel/test/fixtures/traceur/Destructuring/CoverInitializer.js
2015-01-04 19:40:09 +11:00

10 lines
179 B
JavaScript

// https://github.com/google/traceur-compiler/issues/1015
var x, y;
({x = 1, y = 2} = {});
assert.equal(x, 1);
assert.equal(y, 2);
({x: {x = 3}} = {x: {}});
assert.equal(x, 3);