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

14 lines
291 B
TypeScript
Raw Normal View History

// @target: es2015
const C = class D {
static #field = D.#method();
static #method() { return 42; }
static getClass() { return D; }
static getField() { return C.#field };
}
console.log(C.getClass().getField());
C.getClass().#method; // Error
C.getClass().#field; // Error