summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/destructuring-exprbody.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/arguments/destructuring-exprbody.js')
-rw-r--r--js/src/jit-test/tests/arguments/destructuring-exprbody.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/arguments/destructuring-exprbody.js b/js/src/jit-test/tests/arguments/destructuring-exprbody.js
new file mode 100644
index 000000000..5e764d6a0
--- /dev/null
+++ b/js/src/jit-test/tests/arguments/destructuring-exprbody.js
@@ -0,0 +1,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);