fix corner case in evaluate (#3729)

This commit is contained in:
Alex Lam S.L
2020-02-19 00:41:10 +00:00
committed by GitHub
parent 7052ce5aef
commit 6092bf23de
5 changed files with 59 additions and 7 deletions

View File

@@ -84,6 +84,7 @@ wrongly_optimized: {
options = {
booleans: true,
conditionals: true,
dead_code: true,
evaluate: true,
expression: true,
}
@@ -99,8 +100,8 @@ wrongly_optimized: {
function func() {
foo();
}
// TODO: optimize to `func(), bar()`
if (func(), 1) bar();
func(), 1;
bar();
}
}