summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testBug634590d.js
blob: d2e47b51faecb753b3229a80209c7b82fdfb6c0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
this.name = "outer";
var sb = evalcx('');
sb.name = "inner";
sb.parent = this;
this.f = function name(outer) {
    if (outer) {
        return function () {
            return name(false);
        }();
    }
    return this.name;
}
assertEq(evalcx('this.f = parent.f;\n' +
                'var s = "";\n' +
                'for (i = 0; i < 10; ++i)\n' +
                '  s += f(true);\n' +
                's',
                sb),
	 "outerouterouterouterouterouterouterouterouterouter");