summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arrow-functions/eval-1.js
blob: fba4de65f086870c4d95f4b8acfd3b836aa8ba85 (plain)
1
2
3
4
5
6
7
8
9
// Arrow functions in direct eval code.

function f(s) {
    var a = 2;
    return eval(s);
}

var c = f("k => a + k");  // closure should see 'a'
assertEq(c(3), 5);