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

Bug: let followed by a new line fails #409

Closed
galvez opened this issue Sep 23, 2020 · 1 comment
Closed

Bug: let followed by a new line fails #409

galvez opened this issue Sep 23, 2020 · 1 comment

Comments

@galvez
Copy link

galvez commented Sep 23, 2020

Snippet in question:

function foo () {
  let
    bar
  bar = 1
  return bar
}

Error:

Module parse failed: The keyword 'let' is reserved
@evanw
Copy link
Owner

evanw commented Sep 24, 2020

Interesting. This behaves like this in esbuild because it's necessary to be able to pass test262 conformance tests like this one. But it looks like perhaps these ASI rules should only apply in a single-statement context. I will fix this in the next release.

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