mirror of
https://github.com/swc-project/swc.git
synced 2024-12-27 15:42:51 +03:00
30 lines
524 B
TypeScript
30 lines
524 B
TypeScript
// @noUnusedLocals:true
|
|
// @noEmit: true
|
|
// @target: es2015
|
|
|
|
export class A {
|
|
#used = "used";
|
|
#unused = "unused";
|
|
constructor () {
|
|
console.log(this.#used);
|
|
}
|
|
}
|
|
|
|
export class A2 {
|
|
#used() { };
|
|
#unused() { };
|
|
constructor () {
|
|
console.log(this.#used());
|
|
}
|
|
}
|
|
|
|
export class A3 {
|
|
get #used() { return 0 };
|
|
set #used(value: number) { };
|
|
|
|
get #unused() { return 0 };
|
|
set #unused(value: number) { };
|
|
constructor () {
|
|
console.log(this.#used);
|
|
}
|
|
} |