diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-28 02:05:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-28 10:05:59 +0800 |
commit | 28bcdbd7df403a4dca8bd2b7f327b65c8491235d (patch) | |
tree | b6478d1f18a790427fcba01aaec8eecee3de96c3 /test | |
parent | 6a8aed20496cde3b22cad7c9309ec804c71e5c84 (diff) | |
download | tracifyjs-28bcdbd7df403a4dca8bd2b7f327b65c8491235d.tar.gz tracifyjs-28bcdbd7df403a4dca8bd2b7f327b65c8491235d.zip |
fix corner case in `inline` (#4472)
fixes #4471
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/functions.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js index 066bc3ca..af99467a 100644 --- a/test/compress/functions.js +++ b/test/compress/functions.js @@ -5249,3 +5249,37 @@ issue_4451: { } expect_stdout: "function" } + +issue_4471: { + options = { + inline: true, + reduce_funcs: true, + reduce_vars: true, + toplevel: true, + unused: true, + } + input: { + f(f()); + function f() { + return g(); + } + function g() { + { + console.log("PASS"); + } + } + } + expect: { + f(g()); + function f() { + return g(); + } + function g() { + console.log("PASS"); + } + } + expect_stdout: [ + "PASS", + "PASS", + ] +} |