js/src/jit-test/tests/closures/bug496922.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/closures/bug496922.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,20 @@
     1.4 +actual = '';
     1.5 +expected = '0,0,1,1,2,2,3,3,';
     1.6 +
     1.7 +v = 0
     1.8 +let(
     1.9 +f = function() {
    1.10 +    for (let x = 0; x < 4; ++x) {
    1.11 +        v >> x;
    1.12 +        (function() {
    1.13 +            for (let y = 0; y < 2; ++y) {
    1.14 +                appendToActual(x)
    1.15 +            }
    1.16 +        })()
    1.17 +    }
    1.18 +}) { (function() {})()
    1.19 +    f(v)
    1.20 +}
    1.21 +
    1.22 +
    1.23 +assertEq(actual, expected)

mercurial