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

Inconsistent compressing about redeclaration variables #2288

Closed
kevinptt0323 opened this issue Aug 28, 2017 · 1 comment · Fixed by #2289
Closed

Inconsistent compressing about redeclaration variables #2288

kevinptt0323 opened this issue Aug 28, 2017 · 1 comment · Fixed by #2289
Labels

Comments

@kevinptt0323
Copy link

Bug report or feature request?

Bug report

ES5 or ES6+ input?

ES5

Uglify version (uglifyjs -V)

uglify-js 3.0.28

JavaScript input

function foo(o) {
    var bar = o.a;
    for (var i=0; i<0; i++);
    for (var i=0; i<0; i++);
}

The uglifyjs CLI command executed or minify() options used.

uglify in.js -c -b -o out.js

JavaScript output or error produced.

function foo(o) {
    o.a;
    for (f = 0;; f < 0; f++) ;
    for (var f = 0; f < 0; f++) ;
}

There are two consecutive semicolons in the first for-loop.

@kevinptt0323 kevinptt0323 changed the title Incorrect uglify about redeclaration variables Inconsistent compressing about redeclaration variables Aug 28, 2017
@alexlamsl alexlamsl added the bug label Aug 28, 2017
alexlamsl added a commit to alexlamsl/UglifyJS that referenced this issue Aug 28, 2017
@alexlamsl
Copy link
Collaborator

@kevinptt0323 thanks for the clear & concise report 👍

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

Successfully merging a pull request may close this issue.

2 participants