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