summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testBug634590ma.js
blob: 3914cba47afa9946c43c4890c523f67b388f6e69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// |jit-test|

this.name = "outer";
var sb = evalcx('');
sb.name = "inner";
sb.parent = this;
function f() { return this.name; }
assertEq(evalcx('this.f = parent.f;\n' +
                'var s = "";\n' +
                'for (i = 0; i < 10; ++i)\n' +
                '  s += f();\n' +
                's',
                sb),
	 "outerouterouterouterouterouterouterouterouterouter");