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

First token after class should use previous strict-mode state #912

Closed
pvdz opened this issue Mar 1, 2020 · 0 comments
Closed

First token after class should use previous strict-mode state #912

pvdz opened this issue Mar 1, 2020 · 0 comments

Comments

@pvdz
Copy link

pvdz commented Mar 1, 2020

This is the same bug as Babel: babel/babel#11183

I guess when parsing the } closing token of a class, the next token is still parsed as the strict-mode context from that class, rather than using the outer strict mode status.

In script mode, this (a legacy octal) passes in Acorn/Babel (because it applies annexb by default):

05

This fails after a class:

class x {}
05

But passes with anything in between:

class x {}
y
05

(All the above cases should pass in non-strict script mode under annexb rules)

acorn@7.1.0

@marijnh marijnh closed this as completed in 44e52b2 Mar 2, 2020
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

1 participant