-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Scope: Variables inconsistently masked inside of do
#1403
Comments
Thanks for the report, esk. I've been trying for a while to get that |
Worth mentioning that this isn't strictly a
to
Also, the
in a file and |
Thank you for that information, TrevorBurnham. If the behavior of The following prevents the masking from occurring:
I don't quite know the proper etiquette for editing things after someone has responded. |
I'd just leave it unedited, since it's tangential to the point of your post (and not incorrect, really). |
I will usually edit my posts after someone has replied only if it doesn't change the meaning of their reply. I'd hate to put words in someone else's mouth, so I would only edit parts that are not related to their comment. There are exceptions, though, like errors in example code. Just note with an additional reply that you fixed it. |
do
do
…ariables (#4853) * fix #2047 * Additional check for 'step'; tests * Fix #4105 (#4855) * Update output * Throw warning for unsupported runtimes, e.g. Node < 6 (#4839) * fix #1403 (#4854) * Update output * [Change]: Destructuring with non-final spread should still use rest syntax (#4517) (#4825) * destructuring optimization * refactor * minor improvement, fix errors * minor refactoring * improvements * Update output * Update output * Fix #4843: bad output when assigning to @prop in destructuring assignment with defaults (#4848) * fix #4843 * improvements * typo * small fix * Fix #3441: parentheses wrapping expression throw invalid error (#4849) * fix #3441 * improvements * refactor * Fix #1726: expression in property access causes unexpected results (#4851) * fix #1726 * Explain what's happening, rather than just linking to an issue * Updated output * Optimization * Update output * remove casting to number * cleanup tests
Here is the JavaScript generated by the first (broken?) example:
Here is the JavaScript generated by the second (working?) example:
I believe I've reduced the issue to its simplest form, though I could be wrong.
The following prevents the masking from occurring:
for
loop to anif
or awhile
loopfor
loop+=
masked
variable before the loopThe text was updated successfully, but these errors were encountered: