enhance unused (#3839)
This commit is contained in:
@@ -2489,7 +2489,7 @@ drop_duplicated_var_catch: {
|
||||
}
|
||||
}
|
||||
|
||||
issue_3802: {
|
||||
issue_3802_1: {
|
||||
options = {
|
||||
functions: true,
|
||||
reduce_vars: true,
|
||||
@@ -2510,3 +2510,25 @@ issue_3802: {
|
||||
}
|
||||
expect_stdout: "function"
|
||||
}
|
||||
|
||||
issue_3802_2: {
|
||||
options = {
|
||||
functions: true,
|
||||
reduce_vars: true,
|
||||
side_effects: true,
|
||||
toplevel: true,
|
||||
unused: true,
|
||||
}
|
||||
input: {
|
||||
var a = 0;
|
||||
a += 0;
|
||||
var a = function() {};
|
||||
console.log(typeof a);
|
||||
}
|
||||
expect: {
|
||||
0;
|
||||
function a() {};
|
||||
console.log(typeof a);
|
||||
}
|
||||
expect_stdout: "function"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user