enhance unused (#3800)

This commit is contained in:
Alex Lam S.L
2020-04-18 17:10:24 +01:00
committed by GitHub
parent 2a508c6e5f
commit f110601fb4
2 changed files with 33 additions and 3 deletions

View File

@@ -1173,7 +1173,6 @@ var_catch_toplevel: {
x();
} catch (a) {
var a;
var a;
}
}();
}
@@ -2465,3 +2464,27 @@ drop_duplicated_side_effects: {
}
expect_stdout: "1"
}
drop_duplicated_var_catch: {
options = {
unused: true,
}
input: {
function f() {
try {
x();
} catch (a) {
var a, a;
}
}
}
expect: {
function f() {
try {
x();
} catch (a) {
var a;
}
}
}
}