Closed
Description
π Search Terms
class field asi
π Version & Regression Information
- This is the behavior in every version I tried
β― Playground Link
π» Code
class A {
get
*x() {}
}
π Actual behavior
tsc marks the *
as an error (Identifier expected.
)
π Expected behavior
Given that there cannot be a *
after get
, ASI kicks in and that code is equivalent to
class A {
get;
*x() {}
}
Additional information about the issue
Firefox also gets this wrong, I submitted a test262 test case: tc39/test262#4189
Also, ASI does not apply to
class A {
get
async x() {}
}
because async
is a valid token after get
.