summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/destructuring-exprbody.js
blob: 5e764d6a0ed3e9fc5588df38542b26fda305521b (plain)
1
2
3
4
5
6
7
8
// See bug 763313
load(libdir + "iteration.js");
function f([a]) 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);