summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testClosureIncrSideExit.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/testClosureIncrSideExit.js')
-rw-r--r--js/src/jit-test/tests/basic/testClosureIncrSideExit.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testClosureIncrSideExit.js b/js/src/jit-test/tests/basic/testClosureIncrSideExit.js
new file mode 100644
index 000000000..04251e3f3
--- /dev/null
+++ b/js/src/jit-test/tests/basic/testClosureIncrSideExit.js
@@ -0,0 +1,19 @@
+function testClosureIncrSideExit() {
+ {
+ let f = function (y) {
+ {
+ let ff = function (g) {
+ for each(let h in g) {
+ if (++y > 5) {
+ return 'ddd';
+ }
+ }
+ return 'qqq';
+ };
+ return ff(['', null, '', false, '', '', null]);
+ }
+ };
+ return f(-1);
+ }
+}
+assertEq(testClosureIncrSideExit(), "ddd");