summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/cacheir/bindname-lexical-errors.js
blob: d31eecdafb83a269c787991d9835cb4ea0a32b5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const x = 1;
function testConst() {
    for (var i = 0; i < 20; i++) {
        try {
            x = 2;
        } catch (e) {
            continue;
        }
        throw "Fail1";
    }
    assertEq(x, 1);
}
testConst();

function testUninit() {
    for (var i = 0; i < 20; i++) {
        try {
            y = 2;
        } catch (e) {
            continue;
        }
        throw "Fail2";
    }
}
testUninit();
let y;