diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2018-01-21 01:39:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-21 01:39:44 +0800 |
commit | e2dc9cf091684638a75035e7acddbc32ac5c0785 (patch) | |
tree | b45e5e0454d61c418ed09109eb5c30f68f10ada6 /test | |
parent | 069df27bf18247a3e2f1d1a4abd0ee4fe28ef0ce (diff) | |
download | tracifyjs-e2dc9cf091684638a75035e7acddbc32ac5c0785.tar.gz tracifyjs-e2dc9cf091684638a75035e7acddbc32ac5c0785.zip |
fix `unsafe` `evaluate` of `AST_Array` (#2825)
fixes #2822
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/evaluate.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/compress/evaluate.js b/test/compress/evaluate.js index d40880f3..0d26982c 100644 --- a/test/compress/evaluate.js +++ b/test/compress/evaluate.js @@ -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" +} |