handle duplicate argument names in collapse_vars (#2215)

This commit is contained in:
Alex Lam S.L
2017-07-08 04:42:35 +08:00
committed by GitHub
parent 4f70d2e28c
commit 71ee91e716
2 changed files with 29 additions and 3 deletions

View File

@@ -2320,3 +2320,25 @@ issue_2203_2: {
}
expect_stdout: "PASS"
}
duplicate_argname: {
options = {
collapse_vars: true,
unused: true,
}
input: {
function f() { return "PASS"; }
console.log(function(a, a) {
f++;
return a;
}("FAIL", f()));
}
expect: {
function f() { return "PASS"; }
console.log(function(a, a) {
f++;
return a;
}("FAIL", f()));
}
expect_stdout: "PASS"
}