summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arrow-functions/lazy-arrow-1.js
blob: d8678f35dd499c96c99f50a171035d20e2b8598b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function f() {
    let z = (a = (() => 10),
             b = (() => 20)) => {
        return [a, b];
    }

    function g() {
        return 30;
    }

    return [...z(), g];
}

let [a, b, c] = f();

assertEq(a(), 10);
assertEq(b(), 20);
assertEq(c(), 30);