summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testBug634590b.js
blob: 42531a82958d13396fcc5982193e7953ab5f5cd7 (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;
function f() { return this.name; }
f.notMuchTodo = '42';
assertEq(evalcx('{\n' +
                '  let f = parent.f;\n' +
                '  let name = "block";\n' +
                '  (function () {\n' +
                '    eval(f.notMuchTodo);\n' + // reify Block
                '    var s = "";\n' +
                '    for (i = 0; i < 10; ++i)\n' +
                '      s += f();\n' +
                '    return s;\n' +
                '  })();\n' +
                '}',
                sb),
	 "outerouterouterouterouterouterouterouterouterouter");