summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testClosedVarInExtensibleScope.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/jit-test/tests/basic/testClosedVarInExtensibleScope.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testClosedVarInExtensibleScope.js b/js/src/jit-test/tests/basic/testClosedVarInExtensibleScope.js
new file mode 100644
index 0000000000..f06efa6bda
--- /dev/null
+++ b/js/src/jit-test/tests/basic/testClosedVarInExtensibleScope.js
@@ -0,0 +1,13 @@
+function runTest() {
+ if (Math) {
+ function createTester(options) {
+ return function() {
+ return options.blah;
+ };
+ }
+
+ return createTester({blah:"bar"});
+ }
+}
+
+assertEq(runTest()(), "bar");