From 42ecd42ac00881f7d540cb08969ce7e2721e30d5 Mon Sep 17 00:00:00 2001 From: Richard van Velzen Date: Mon, 12 Jan 2015 17:09:34 +0100 Subject: Replace the correct node when replacing in `void` sequences Close #611. --- test/compress/issue-611.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/compress/issue-611.js (limited to 'test/compress') 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(); + }); + } +} -- cgit v1.2.3