summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug620838.js
blob: c82933ae80629c97a85360be5311ec7a4db668e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function g() {
    return "global";
}

function q(fun) {
    return fun();
}

function f(x) {
    if (x) {
        function g() {
            return "local";
        }
        var ans = q(function() {
            return g();
        });
    }
    g = null;
    return ans;
}

assertEq(f(true), "local");