diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/functions.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js index 1359670e..909a57dd 100644 --- a/test/compress/functions.js +++ b/test/compress/functions.js @@ -336,3 +336,32 @@ issue_2084: { } expect_stdout: "0" } + +issue_2097: { + options = { + negate_iife: true, + reduce_vars: true, + toplevel: true, + unused: true, + } + input: { + function f() { + try { + throw 0; + } catch (e) { + console.log(arguments[0]); + } + } + f(1); + } + expect: { + !function() { + try { + throw 0; + } catch (e) { + console.log(arguments[0]); + } + }(1); + } + expect_stdout: "1" +} |