`get #x` requires newline, not semicolon
bbrk24 opened this issue · comments
This compiles:
class Dummy
#x: number
get #x
private set #x
This does not:
class Dummy
#x: number
get #x; private set #x
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?