comparison: js/src/jit-test/tests/arrow-functions/this-2.js
js/src/jit-test/tests/arrow-functions/this-2.js
- changeset 0
- 6474c204b198
equal
deleted
inserted
replaced
|
1 // 'this' is lexically scoped in direct eval code in arrow functions |
|
2 |
|
3 var obj = { |
|
4 f: function (s) { |
|
5 return a => eval(s); |
|
6 } |
|
7 }; |
|
8 |
|
9 var g = obj.f("this"); |
|
10 assertEq(g(), obj); |
|
11 |
|
12 var obj2 = {g: g, fail: true}; |
|
13 assertEq(obj2.g(), obj); |