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 additional let/var init bugs #4177
Fix additional let/var init bugs #4177
Conversation
including blockless if statement `var` declarations and let/var use before declaration within same function
Codecov Report
@@ Coverage Diff @@
## master #4177 +/- ##
==========================================
+ Coverage 91.27% 98.33% +7.06%
==========================================
Files 170 202 +32
Lines 5923 7227 +1304
Branches 1794 2114 +320
==========================================
+ Hits 5406 7107 +1701
+ Misses 311 58 -253
+ Partials 206 62 -144
Continue to review full report at Codecov.
|
Thank you for your contribution! ❤️You can try out this pull request locally by installing Rollup via npm install kzc/rollup#additional-variable-init-fixes or load it into the REPL: |
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.
I took the liberty of replacing the removed example in the docs with one that is still failing, otherwise we can merge this for now.
Works for me. |
Fix additional variable state change bugs including blockless
if
statementvar
declarations andlet
/var
use before declaration within same function that do not cross function scopes.This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
Fixes several outstanding var/let init issues mentioned in #4148 without any code pessimization other than for previously incorrect rollup output, and with minimal overhead.