diff options
Diffstat (limited to 'js/src/jit-test/tests/closures/name4.js')
-rw-r--r-- | js/src/jit-test/tests/closures/name4.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/closures/name4.js b/js/src/jit-test/tests/closures/name4.js new file mode 100644 index 0000000000..596028e593 --- /dev/null +++ b/js/src/jit-test/tests/closures/name4.js @@ -0,0 +1,22 @@ +actual = ''; +expected = 'undefined,'; + +function loop(f) { + var p; + for (var i = 0; i < 10; ++i) { + p = f(); + } + return p; +} + +function make(k, j) { + var g = function() { return k; } + k = j; + return g; +} + +var f = make(); +appendToActual(loop(f)); + + +assertEq(actual, expected) |