diff options
Diffstat (limited to 'js/src/jit-test/tests/closures/lambda-light.js')
-rw-r--r-- | js/src/jit-test/tests/closures/lambda-light.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/closures/lambda-light.js b/js/src/jit-test/tests/closures/lambda-light.js new file mode 100644 index 000000000..933da605e --- /dev/null +++ b/js/src/jit-test/tests/closures/lambda-light.js @@ -0,0 +1,19 @@ +actual = ''; +expected = '10,'; + +function f(x) { + { + let x2 = 10; + for (var i = 0; i < 5; ++i) { + var g = function () { + appendToActual(x2); + }; + } + g(); + } +} + +f(1); + + +assertEq(actual, expected) |