diff options
Diffstat (limited to 'test/compress/issue-637.js')
-rw-r--r-- | test/compress/issue-637.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/compress/issue-637.js b/test/compress/issue-637.js new file mode 100644 index 00000000..45fd2481 --- /dev/null +++ b/test/compress/issue-637.js @@ -0,0 +1,22 @@ +wrongly_optimized: { + options = { + conditionals: true, + booleans: true, + evaluate: true + }; + input: { + function func() { + foo(); + } + if (func() || true) { + bar(); + } + } + expect: { + function func() { + foo(); + } + // TODO: optimize to `func(), bar()` + (func(), 0) || bar(); + } +} |