summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/destructuring-exprbody.js
blob: 5f3f04ecb746a911f9618bb4061618ba27a40689 (plain)
1
2
3
4
5
6
7
8
// See bug 763313
load(libdir + "iteration.js");
function f([a]) { return a; }
var i = 0;
var o = {[Symbol.iterator]: function () { i++; return {
  next: function () { i++; return {value: 42, done: false}; }}}};
assertEq(f(o), 42);
assertEq(i, 2);