mirror of
https://github.com/swc-project/swc.git
synced 2024-12-20 04:01:39 +03:00
24 lines
430 B
TypeScript
24 lines
430 B
TypeScript
|
// @useDefineForClassFields: false
|
||
|
// @target: es2015
|
||
|
|
||
|
class Base {
|
||
|
}
|
||
|
class Sub extends Base {
|
||
|
// @ts-ignore
|
||
|
constructor(public p: number) {
|
||
|
console.log('hi'); // should emit before super
|
||
|
super();
|
||
|
}
|
||
|
field = 0;
|
||
|
}
|
||
|
|
||
|
class Test extends Base {
|
||
|
prop: number;
|
||
|
// @ts-ignore
|
||
|
constructor(public p: number) {
|
||
|
1; // should emit before super
|
||
|
super();
|
||
|
this.prop = 1;
|
||
|
}
|
||
|
}
|