diff options
author | alexlamsl <alexlamsl@gmail.com> | 2020-09-22 05:03:06 +0800 |
---|---|---|
committer | alexlamsl <alexlamsl@gmail.com> | 2020-09-22 05:03:06 +0800 |
commit | 51803cdcb2a7d4e396b46b38acc1cb70152a3ad8 (patch) | |
tree | d9ff61498d18149d8a4be7909e8d9027e6c3bad9 /test | |
parent | 8fa470c17c56d62f971fa71fb1cb99e961b64d8e (diff) | |
download | tracifyjs-51803cdcb2a7d4e396b46b38acc1cb70152a3ad8.tar.gz tracifyjs-51803cdcb2a7d4e396b46b38acc1cb70152a3ad8.zip |
fix corner case in `merge_vars`
fixes #4139
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/merge_vars.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/compress/merge_vars.js b/test/compress/merge_vars.js index b5b71019..559832c2 100644 --- a/test/compress/merge_vars.js +++ b/test/compress/merge_vars.js @@ -2738,3 +2738,31 @@ issue_4135: { } expect_stdout: "1 -1 undefined" } + +issue_4139: { + options = { + merge_vars: true, + toplevel: true, + } + input: { + try { + console.log; + } catch (e) { + var a, arguments = 0; + } finally { + a = typeof arguments; + console.log(a); + } + } + expect: { + try { + console.log; + } catch (e) { + var a, arguments = 0; + } finally { + a = typeof arguments; + console.log(a); + } + } + expect_stdout: "object" +} |