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

26 lines
343 B
TypeScript
Raw Normal View History

// @target: es2015
class Foo {
#p: number;
constructor(value: number) {
this.#p = value;
}
t1(p: number) {
(this.#p as number) = p;
}
t2(p: number) {
(((this.#p as number))) = p;
}
t3(p: number) {
(this.#p) = p;
}
t4(p: number) {
(((this.#p))) = p;
}
}