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

15 lines
332 B
TypeScript

// @target: es2015
class X {
static #f = X.#m();
constructor() {
X.#m();
}
static #m() {
const X: any = {}; // shadow the class
const _a: any = {}; // shadow the first generated var
X.#m(); // Should check with X as the receiver with _b as the class constructor
return 1;
}
}