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

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:2d1893620ee1
1 actual = '';
2 expected = '4,';
3
4 function k(f_arg) {
5 for (var i = 0; i < 5; ++i) {
6 f_arg(i);
7 }
8 }
9
10 function t(x) {
11 k(function (i) { x = i; });
12 appendToActual(x);
13 }
14
15 t(1);
16
17
18 assertEq(actual, expected)

mercurial