fix inline on duplicate argument names (#2698)

This commit is contained in:
Alex Lam S.L
2017-12-31 20:59:58 +08:00
committed by GitHub
parent 333792352e
commit da82fa59a7
2 changed files with 26 additions and 1 deletions

View File

@@ -1646,3 +1646,28 @@ issue_2663_3: {
"reset",
]
}
duplicate_argnames: {
options = {
inline: true,
reduce_vars: true,
side_effects: true,
toplevel: true,
unused: true,
}
input: {
var a = "PASS";
function f(b, b, b) {
b && (a = "FAIL");
}
f(0, console);
console.log(a);
}
expect: {
var a = "PASS";
console, b && (a = "FAIL");
var b;
console.log(a);
}
expect_stdout: "PASS"
}