enhance merge_vars (#5194)

closes #5182
This commit is contained in:
Alex Lam S.L
2021-11-24 10:21:50 +00:00
committed by alexlamsl
parent bfd0ac7f4b
commit 0b6c185818
6 changed files with 75 additions and 11 deletions

View File

@@ -9522,7 +9522,7 @@ issue_5182: {
hoist_props: true,
inline: true,
merge_vars: true,
passes: 3,
passes: 4,
reduce_vars: true,
sequences: true,
side_effects: true,
@@ -9555,8 +9555,8 @@ issue_5182: {
console.log(obj.foo(1, 2), global.log("PASS"));
}
expect: {
var obj = console;
global.log = obj.log,
var con = console;
global.log = con.log,
console.log((console.log("BAR:", 3), -1), global.log("PASS"));
}
expect_stdout: [