summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/closures/t033.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/closures/t033.js')
-rw-r--r--js/src/jit-test/tests/closures/t033.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/closures/t033.js b/js/src/jit-test/tests/closures/t033.js
new file mode 100644
index 000000000..e030fbf3c
--- /dev/null
+++ b/js/src/jit-test/tests/closures/t033.js
@@ -0,0 +1,19 @@
+actual = '';
+expected = '2,';
+
+function k(f_arg) {
+ for (var i = 0; i < 100; ++i) {
+ f_arg();
+ }
+}
+
+function t() {
+ var x = 1;
+ k(function () { x = 2; });
+ appendToActual(x);
+}
+
+t();
+
+
+assertEq(actual, expected)