mirror of
https://github.com/swc-project/swc.git
synced 2024-12-27 15:42:51 +03:00
17 lines
300 B
TypeScript
17 lines
300 B
TypeScript
|
// @target: esnext
|
||
|
// @useDefineForClassFields: true
|
||
|
class A {
|
||
|
p = 'yep'
|
||
|
}
|
||
|
class B extends A {
|
||
|
get p() { return 'oh no' } // error
|
||
|
}
|
||
|
class C {
|
||
|
p = 101
|
||
|
}
|
||
|
class D extends C {
|
||
|
_secret = 11
|
||
|
get p() { return this._secret } // error
|
||
|
set p(value) { this._secret = value } // error
|
||
|
}
|