summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testPartialFlatClosure.js
blob: 9998ce306b85f9e237a7ddabed2020c59d5b0a0c (plain)
1
2
3
4
5
6
7
8
9
10
assertEq((('-r', function (s) {
    function C(i) {
        this.m = function () { return i * t; }
    }
    var t = s;
    var a = [];
    for (var i = 0; i < 5; i++)
        a[a.length] = new C(i);
    return a;
})(42))[4].m(), 168);