Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async identifier/keyword reference inside class static block #66

Closed
Kingwl opened this issue Apr 19, 2021 · 1 comment
Closed

Async identifier/keyword reference inside class static block #66

Kingwl opened this issue Apr 19, 2021 · 1 comment

Comments

@Kingwl
Copy link
Member

Kingwl commented Apr 19, 2021

According to proposal-class-static-block

const async = 42

class C {
  static {
    const foo = await // illegal
    const bar = do {
        const b = await // legal or illegal ?
    }
  }
}

It's basically means does the do expression is a function boundary( tc39/proposal-class-static-block#43) ? Even the concept function boundary is not well-defined.

@bakkot
Copy link
Collaborator

bakkot commented Apr 19, 2021

Assuming you mean await rather than async, illegal. do has the same restrictions on syntax as the surrounding context.

@Kingwl Kingwl closed this as completed Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants