enhance unsafe for Array (#3349)

This commit is contained in:
Alex Lam S.L
2019-03-20 06:37:51 +08:00
committed by GitHub
parent b9615f7a62
commit f2286c33f1
3 changed files with 158 additions and 9 deletions

View File

@@ -6716,3 +6716,24 @@ issue_3297: {
}
expect_stdout: "true"
}
drop_side_effect_free: {
options = {
collapse_vars: true,
evaluate: true,
reduce_vars: true,
side_effects: true,
toplevel: true,
}
input: {
var a = 123;
"" + (a && (a.b = 0) || a);
console.log(a);
}
expect: {
var a = 123;
a.b = 0;
console.log(a);
}
expect_stdout: "123"
}