summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arrow-functions/this-3.js
blob: 59398a3cb36d8db63ceeceedac889e8d8cd899f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 'this' is lexically scoped in arrow functions in direct eval code

var obj = {
    f: function (s) {
        return eval(s);
    }
};

var g = obj.f("a => this");
assertEq(g(), obj);

var obj2 = {g: g, fail: true};
assertEq(obj2.g(), obj);