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

11 lines
131 B
TypeScript
Raw Normal View History

// @target: es2015
const C = class {
set #x(x) {}
m() {
this.#x += 2; // Error
}
}
console.log(new C().m());