mirror of
https://github.com/swc-project/swc.git
synced 2025-01-07 06:06:41 +03:00
19 lines
285 B
JavaScript
19 lines
285 B
JavaScript
// @target: es2015,esnext
|
|
// @useDefineForClassFields: true
|
|
class A {
|
|
foo() {
|
|
console.log(this.x);
|
|
}
|
|
}
|
|
class B extends A {
|
|
constructor(...args){
|
|
super(...args);
|
|
this.x = 'B.x';
|
|
}
|
|
}
|
|
class C extends A {
|
|
get x() {
|
|
return 'C.x';
|
|
}
|
|
}
|