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: f.notMuchTodo = '42'; michael@0: assertEq(evalcx('{\n' + michael@0: ' let f = parent.f;\n' + michael@0: ' let name = "block";\n' + michael@0: ' (function () {\n' + michael@0: ' eval(f.notMuchTodo);\n' + // reify Block michael@0: ' var s = "";\n' + michael@0: ' for (i = 0; i < 10; ++i)\n' + michael@0: ' s += f();\n' + michael@0: ' return s;\n' + michael@0: ' })();\n' + michael@0: '}', michael@0: sb), michael@0: "outerouterouterouterouterouterouterouterouterouter");