mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
51 lines
820 B
JavaScript
51 lines
820 B
JavaScript
class Base {};
|
|
|
|
expect(() => new class extends Base {
|
|
constructor() {
|
|
x: { break x; super(); }
|
|
}
|
|
}).toThrow();
|
|
|
|
expect(() => new class extends Base {
|
|
constructor() {
|
|
try {} catch { super(); }
|
|
}
|
|
}).toThrow();
|
|
|
|
expect(() => new class extends Base {
|
|
constructor() {
|
|
try { throw 0; super(); } catch {}
|
|
}
|
|
}).toThrow();
|
|
|
|
expect(() => new class extends Base {
|
|
constructor() {
|
|
true || super();
|
|
}
|
|
}).toThrow();
|
|
|
|
expect(() => new class extends Base {
|
|
constructor() {
|
|
({}) ?? super();
|
|
}
|
|
}).toThrow();
|
|
|
|
expect(() => new class extends Base {
|
|
constructor() {
|
|
false && super();
|
|
}
|
|
}).toThrow();
|
|
|
|
expect(() => new class extends Base {
|
|
constructor() {
|
|
null?.(super());
|
|
}
|
|
}).toThrow();
|
|
|
|
|
|
expect(() => new class extends Base {
|
|
constructor() {
|
|
null?.[super()];
|
|
}
|
|
}).toThrow();
|