summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/class/bug1488385.js
blob: 46a15c0611aa8be97461eb302f4540ae1c8ea8ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Default class constructors should no longer be marked as self-hosted
// functions. They should be munged to appear in every respect as if they
// originated with the class definition.

load(libdir + 'asserts.js');

function f() {
    return f.caller.p;
}

// Since default constructors are strict mode code, this should get:
// TypeError: access to strict mode caller function is censored
assertThrowsInstanceOf(() => new class extends f {}, TypeError);