summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/strict-nested-assign-shadowed-var.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/arguments/strict-nested-assign-shadowed-var.js')
-rw-r--r--js/src/jit-test/tests/arguments/strict-nested-assign-shadowed-var.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/arguments/strict-nested-assign-shadowed-var.js b/js/src/jit-test/tests/arguments/strict-nested-assign-shadowed-var.js
new file mode 100644
index 000000000..8248bed33
--- /dev/null
+++ b/js/src/jit-test/tests/arguments/strict-nested-assign-shadowed-var.js
@@ -0,0 +1,29 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+load(libdir + 'array-compare.js');
+
+var obj = {};
+
+/********************
+ * STRICT ARGUMENTS *
+ ********************/
+
+function strictNestedAssignShadowVar(p)
+{
+ "use strict";
+ function inner()
+ {
+ var p = 12;
+ function innermost() { p = 1776; return 12; }
+ return innermost();
+ }
+ return arguments;
+}
+
+assertEq(arraysEqual(strictNestedAssignShadowVar(), []), true);
+assertEq(arraysEqual(strictNestedAssignShadowVar(99), [99]), true);
+assertEq(arraysEqual(strictNestedAssignShadowVar(""), [""]), true);
+assertEq(arraysEqual(strictNestedAssignShadowVar(obj), [obj]), true);
+