-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
Description
Describe the bug
svelte compiler cannot handle number class member correctly.
generates duplicate replacement private member #_
const x = new (class {
#_ = $.state();
get 1() {
return $.get(this.#_);
}
set 1(value) {
$.set(this.#_, $.proxy(value));
}
#_ = $.state();
get 2() {
return $.get(this.#_);
}
set 2(value) {
$.set(this.#_, $.proxy(value));
}
})();
N.B.:
🥴
1= ➡️ #_
20= ➡️ #_0
🫠
10= ➡️ #_0
20= ➡️ #_0
Identifier '#_0' has already been declared
Reproduction
Logs
No response
System Info
version=5.8.1
blink: Identifier '#_0' has already been declared
gecko: getter and setter for private name #_ should either be both static or non-static
Severity
annoyance