summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/closures/t020.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/closures/t020.js')
-rw-r--r--js/src/jit-test/tests/closures/t020.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/closures/t020.js b/js/src/jit-test/tests/closures/t020.js
new file mode 100644
index 0000000000..30c8b463df
--- /dev/null
+++ b/js/src/jit-test/tests/closures/t020.js
@@ -0,0 +1,17 @@
+actual = '';
+expected = '0,0,1,1,2,2,3,3,';
+
+{ let f = function() {
+ for (let x = 0; x < 4; ++x) {
+ (function() {
+ for (let y = 0; y < 2; ++y) {
+ appendToActual(x);
+ }
+ })()
+ }
+};
+ f(0)
+}
+
+
+assertEq(actual, expected)