diff options
author | Richard van Velzen <rvanvelzen@experty.com> | 2015-01-12 17:09:34 +0100 |
---|---|---|
committer | Richard van Velzen <rvanvelzen@experty.com> | 2015-01-12 17:09:34 +0100 |
commit | 42ecd42ac00881f7d540cb08969ce7e2721e30d5 (patch) | |
tree | 8879a10566f02177db66450ffa72d52d7639ff72 /test/compress | |
parent | a10f6a96d724319f9bb582dab42392b4ef05a0e0 (diff) | |
download | tracifyjs-42ecd42ac00881f7d540cb08969ce7e2721e30d5.tar.gz tracifyjs-42ecd42ac00881f7d540cb08969ce7e2721e30d5.zip |
Replace the correct node when replacing in `void` sequences
Close #611.
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/issue-611.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/compress/issue-611.js b/test/compress/issue-611.js new file mode 100644 index 00000000..6f2c65d2 --- /dev/null +++ b/test/compress/issue-611.js @@ -0,0 +1,21 @@ +issue_611: { + options = { + sequences: true, + side_effects: true + }; + input: { + define(function() { + function fn() {} + if (fn()) { + fn(); + return void 0; + } + }); + } + expect: { + define(function() { + function fn(){} + if (fn()) return void fn(); + }); + } +} |