mirror of
https://github.com/swc-project/swc.git
synced 2024-12-25 06:36:08 +03:00
14 lines
400 B
TypeScript
14 lines
400 B
TypeScript
|
// @target: es2015
|
||
|
|
||
|
class A3 {
|
||
|
#method() { };
|
||
|
constructor(a: A3, b: any) {
|
||
|
this.#method = () => {} // Error, not writable
|
||
|
a.#method = () => { }; // Error, not writable
|
||
|
b.#method = () => { } //Error, not writable
|
||
|
({ x: this.#method } = { x: () => {}}); //Error, not writable
|
||
|
let x = this.#method;
|
||
|
b.#method++ //Error, not writable
|
||
|
}
|
||
|
}
|