diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-06-15 03:28:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-15 03:28:26 +0800 |
commit | 3f961bbba04a8cec0ab74f4a13deb4be217da877 (patch) | |
tree | 11c594d0423b25fd14303bad7d87ad626085895e /test/compress | |
parent | 0a1e523cd5de9b96946b05bd70b3f125a4bfb4cc (diff) | |
download | tracifyjs-3f961bbba04a8cec0ab74f4a13deb4be217da877.tar.gz tracifyjs-3f961bbba04a8cec0ab74f4a13deb4be217da877.zip |
compute `uses_arguments` correctly in `figure_out_scope()` (#2099)
fixes #2097
Diffstat (limited to 'test/compress')
-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" +} |