-
Notifications
You must be signed in to change notification settings - Fork 146
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 with shadowed variable not being resolved correctly #315
Comments
Thanks for reporting! Would you like to submit a PR with the fix? |
I looked into it and I'm not sure how to proceed. The problem is the very outdated dependency |
Part of #315 Bumping the version made a previous workaround of conflicting estree-walker versions unnecessary, but required to bring back a now-deleted type from the package
Part of #315 This fixes a bug where `attachScopes` didn't detect the new scope inside the for loop with shadowed variables before, resulting in later code paths possibly crashing because they expect the dependency to be of type string. No test added because as noted in #315 this doesn't thix that issue (if it even is one). Bumping the version made a previous workaround of conflicting estree-walker versions unnecessary, but required to bring back a now-deleted type from the package
With #316 merged, is there anything left to do here? The dependency |
We can a target node 14 now that 12 is EOL #318 |
To fix this code, you should avoid using the name path for both the loop variable and the constant variable at the beginning. Here's an updated version of the code:
|
Analyzing this code
fails with the error
It seems that
path
is resolved to123
and not to"asd"
, and it seems that assigning tobinding
is what triggeres it, because if that is removed, it works.The real world case where this happens is when analyzing
aws-crt
The text was updated successfully, but these errors were encountered: