summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arrow-functions/return-1.js
blob: b89d979e2d28ad7b795f4f06b23f194ec0d2e6c9 (plain)
1
2
3
4
5
6
7
8
9
// return from a block function works when there is no other enclosing function

var f = a => {
    if (a)
        return a + 1;
    throw "FAIL";
};

assertEq(f(1), 2);