Backed out 14 changesets (bug 1865005, bug 1864168, bug 1864155, bug 1862814, bug...
[gecko.git] / js / src / jit-test / tests / class / bug1488385.js
blob46a15c0611aa8be97461eb302f4540ae1c8ea8ca
1 // Default class constructors should no longer be marked as self-hosted
2 // functions. They should be munged to appear in every respect as if they
3 // originated with the class definition.
5 load(libdir + 'asserts.js');
7 function f() {
8     return f.caller.p;
11 // Since default constructors are strict mode code, this should get:
12 // TypeError: access to strict mode caller function is censored
13 assertThrowsInstanceOf(() => new class extends f {}, TypeError);