fix corner case in inline (#2720)

This commit is contained in:
Alex Lam S.L
2018-01-04 23:38:37 +08:00
committed by GitHub
parent 6f3f21233f
commit 484e484571
2 changed files with 35 additions and 14 deletions

View File

@@ -1887,3 +1887,21 @@ use_before_init_in_loop: {
}
expect_stdout: "PASS"
}
duplicate_arg_var: {
options = {
inline: true,
toplevel: true,
}
input: {
console.log(function(b) {
return b;
var b;
}("PASS"));
}
expect: {
console.log((b = "PASS", b));
var b;
}
expect_stdout: "PASS"
}