trim unused invocation parameters (#1526)

This commit is contained in:
Alex Lam S.L
2017-03-02 11:33:59 +08:00
committed by GitHub
parent fdc9b9413b
commit 9699ffb1af
2 changed files with 37 additions and 0 deletions

View File

@@ -646,6 +646,29 @@ call_args: {
}
}
call_args_drop_param: {
options = {
evaluate: true,
keep_fargs: false,
reduce_vars: true,
unused: true,
}
input: {
const a = 1;
console.log(a);
+function(a) {
return a;
}(a, b);
}
expect: {
const a = 1;
console.log(1);
+function() {
return 1;
}(b);
}
}
in_boolean_context: {
options = {
booleans: true,