swc/crates/swc_ecma_parser/tests/tsc/privateNameStaticMethodAssignment.ts
2022-02-04 17:08:38 +09:00

14 lines
408 B
TypeScript

// @target: es2015
class A3 {
static #method() { };
constructor(a: typeof A3, b: any) {
A3.#method = () => {} // Error, not writable
a.#method = () => { }; // Error, not writable
b.#method = () => { } //Error, not writable
({ x: A3.#method } = { x: () => {}}); //Error, not writable
let x = A3.#method;
b.#method++ //Error, not writable
}
}