summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/baseline/bug1182866.js
blob: 17a59c6f28a1480d2e5e43a1a3411e5a32805f58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// |jit-test| error: ReferenceError

with(7) {
    function f() {
        if (i == 15) {
            g();
        }
        const x = 42;
        function g() {
            return x;
        }
        return g;
    }
}
for (var i = 0; i < 99; i++) {
    assertEq(f()(), 42);
}