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