summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/class/derivedConstructorTDZReturnTry.js
blob: 96791c0e78e8fa52e0a5ab6fac0fe0e4c99faacf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class base {}
class derived extends base {
  constructor() {
    try {
      return;
    } catch (e) {
      try {
        return;
      } catch (e) {}
    }
  }
}
assertThrowsInstanceOf(() => new derived, ReferenceError);

if (typeof reportCompare === 'function')
    reportCompare(0,0,"OK");