summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/fields/bug1547129.js
blob: a543d5884671641db8d26d45ba713dbb15b9543c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
load(libdir + "asserts.js");

new class foo extends Array {
  e = function() {}
}

source = `new class bar extends Promise { e = function() {} }`;
// Calling the Promise constructor with empty args fails with TypeError.
assertThrowsInstanceOf(() => eval(source), TypeError);

class Base {
  constructor() {
    return new Proxy({}, {});
  }
}

new class prox extends Base {
  e = function () {}
}