diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-09-29 00:01:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-29 07:01:38 +0800 |
commit | 1d835ac17de613093a538a4ab72160508197e08c (patch) | |
tree | 3ecfd2753bc60da4f484b333a2c0a5e0541e9dc0 /test | |
parent | 9e07ac410261dcbc074a29598a974b5de7cbe1da (diff) | |
download | tracifyjs-1d835ac17de613093a538a4ab72160508197e08c.tar.gz tracifyjs-1d835ac17de613093a538a4ab72160508197e08c.zip |
fix corner case in `inline` (#4160)
fixes #4159
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/functions.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js index 1be01167..4d753469 100644 --- a/test/compress/functions.js +++ b/test/compress/functions.js @@ -4808,3 +4808,24 @@ issue_4155: { "function", ] } + +issue_4159: { + options = { + collapse_vars: true, + inline: true, + reduce_vars: true, + toplevel: true, + unused: true, + } + input: { + var a = 42, c = function(b) { + (b = a) && console.log(a++, b); + }(c = a); + } + expect: { + var a = 42; + (b = a) && console.log(a++, b); + var b; + } + expect_stdout: "42 42" +} |