fix unsafe evaluate of AST_Array (#2825)

fixes #2822
This commit is contained in:
Alex Lam S.L
2018-01-21 01:39:44 +08:00
committed by GitHub
parent 069df27bf1
commit e2dc9cf091
2 changed files with 18 additions and 1 deletions

View File

@@ -1360,3 +1360,17 @@ issue_2535_3: {
"WARN: Condition left of || always true [test/compress/evaluate.js:1341,20]",
]
}
issue_2822: {
options = {
evaluate: true,
unsafe: true,
}
input: {
console.log([ function() {}, "PASS", "FAIL" ][1]);
}
expect: {
console.log("PASS");
}
expect_stdout: "PASS"
}