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

[pluginutils] attachScopes ignores variables declared in for-of statement #547

Closed
eight04 opened this issue Aug 19, 2020 · 5 comments · Fixed by #616
Closed

[pluginutils] attachScopes ignores variables declared in for-of statement #547

eight04 opened this issue Aug 19, 2020 · 5 comments · Fixed by #616

Comments

@eight04
Copy link
Contributor

eight04 commented Aug 19, 2020

Expected Behavior

The local scope should contain variable a.

Actual Behavior

The local scope doesn't contain variable a.

Additional Information

It has been reported once but the issue is closed:
#113

@shellscape
Copy link
Collaborator

Pull requests to resolve this issue are welcome. This is unlikely to get a fix without community contribution.

@eight04
Copy link
Contributor Author

eight04 commented Aug 19, 2020

I took a look at the test file, it seems that the ast is hand-crafted. Do I have to find some ways to build them manually? or can we generate the AST by parsing readable source code?

@lukastaegert
Copy link
Member

My guess is that they were created by pasting some code here: https://astexplorer.net/ Alternatively of course you could just run acorn in your test.

@eight04
Copy link
Contributor Author

eight04 commented Aug 31, 2020

Can we merge #551 first? I will start working on for-loop issues after that.

@eight04
Copy link
Contributor Author

eight04 commented Oct 21, 2020

Relate: #548, #549

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants