-
Notifications
You must be signed in to change notification settings - Fork 77
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
Fix the reference resolving logic for global. #61
Fix the reference resolving logic for global. #61
Conversation
- References of `let`/`const`/`class` declarations should be resolved statically on the global scope also. - Add very simple test cases.
// others should be resolved dynamically. | ||
if (this.__shouldStaticallyCloseForGlobal(ref)) { | ||
this.__staticCloseRef(ref); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This formatting is odd.
Very nice! 👍 |
Thank you! I got that I found an issue. |
Yes. This is because, at that time, AST tree for default parameter was ambiguous (acorn style v.s. esprima style). |
OK, I will remove tests for those from this PR, and try to implement those on other PR later. |
- default parameters of functions and default values of destructuring assignment are not supported yet. I'll add those later again.
Maybe done. Note:
I guess the cause is:
|
…t-const-class Fix the reference resolving logic for global.
References of
let
/const
/class
should be resolvedstatically on the global scope also.
Related: #49 #56