-
Notifications
You must be signed in to change notification settings - Fork 1.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
Bug: catch var dropped as unused #1715
Comments
This one is due to |
Minimal test case: options = {
unused: true,
}
input: {
var a = 1;
function f() {
a++;
try {} catch (a) {
var a;
}
}
f();
console.log(a);
} |
alexlamsl
changed the title
Bug: catch var in finally using wrong scope
Bug: catch var dropped as unused
Mar 28, 2017
alexlamsl
added a commit
to alexlamsl/UglifyJS
that referenced
this issue
Mar 28, 2017
alexlamsl
added a commit
to alexlamsl/UglifyJS
that referenced
this issue
Mar 28, 2017
alexlamsl
added a commit
that referenced
this issue
Mar 28, 2017
alexlamsl
added a commit
to alexlamsl/UglifyJS
that referenced
this issue
Mar 28, 2017
When fixing catch-related issue in mishoo#1715, it tries to optimise for duplicate definitions but did not take anonymous functions into account. Remove such optimisation for now and we can cover this as a more general rule later.
alexlamsl
added a commit
that referenced
this issue
Mar 28, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report or feature request?
Bug. Found by fuzzer.
uglify-js
version (uglifyjs -V
)Git master, f71f490
I think this means #1708 isn't completely solved yet.
The text was updated successfully, but these errors were encountered: