summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/class/bug1715318.js
blob: 6513cfeb8ac7d0331d480ce9fe63d434c5d9c0d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// |jit-test| --no-threads; --fast-warmup
function f() {
    // A non-constructor with a null .prototype.
    let arrow = _ => null;
    arrow.prototype = null;

    // Warm up.
    for (var i = 0; i < 100; i++) {}

    try {
        class C1 extends arrow {}
        throw "Fail";
    } catch (e) {
        assertEq(e instanceof TypeError, true);
    }
}
f();
f();