summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug1365769-1.js
blob: a586d0f1de412541409b2bdf6f655ec4f4726c49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// --ion-eager --ion-offthread-compile=off

function f(t) {
    for (var i = 0; i < 2; i++) {
        try {
            var x = 1;
            new String();   // Creates a snapshot
            x = 2;
            new String(t);  // Throws TypeError
        } catch (e) {
            assertEq(x, 2);
        }
    }
}

f(Symbol());