summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/class/checkreturn-catch-super-arrow.js
blob: 0645c51e23f283f00322b547e9f1eb0ceabdf1c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
load(libdir + "asserts.js");

class C extends class {} {
  constructor() {
    var f = () => super();

    try {
      return 0;
    } catch {
      f();
    }
  }
}

function test() {
  for (var i = 0; i < 100; ++i) {
    assertThrowsInstanceOf(() => new C(), TypeError);
  }
}

test();