summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/destructuring-default-value-scope.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/arguments/destructuring-default-value-scope.js')
-rw-r--r--js/src/jit-test/tests/arguments/destructuring-default-value-scope.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/arguments/destructuring-default-value-scope.js b/js/src/jit-test/tests/arguments/destructuring-default-value-scope.js
new file mode 100644
index 0000000000..c4b16ea4df
--- /dev/null
+++ b/js/src/jit-test/tests/arguments/destructuring-default-value-scope.js
@@ -0,0 +1,10 @@
+var a = 10;
+function f1(a,
+ [b=(assertEq(a, 1), a=2, 42)],
+ {c:c=(assertEq(a, 2), a=3, 43)}) {
+ assertEq(a, 3);
+ assertEq(b, 42);
+ assertEq(c, 43);
+}
+f1(1, [], {});
+assertEq(a, 10);