swc/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty3.ts

11 lines
240 B
TypeScript

// @target: esnext
// @useDefineForClassFields: true
declare class Animal {
sound: string
}
class Lion extends Animal {
_sound = 'grrr'
get sound() { return this._sound } // error here
set sound(val) { this._sound = val }
}