Open bbrk24 opened 1 month ago
Currently, ; private set #x
is being treated as a body to the get
. Example where this is more obvious (also with another bug — missing ;
before return
):
class Dummy
#x: number
get #x; set #x
---
class Dummy {
#x: number
get x() {; set(this.#x)return this.#x }
}
I agree this is a bit counterintuitive, but I'm trying to understand the general rule that's being violated. Perhaps a body of ;
should be treated as complete?
This compiles:
This does not: