diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-05-28 01:47:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-28 08:47:37 +0800 |
commit | 8cd95dd2635189b27d1956796d917549e2179bf5 (patch) | |
tree | ced7ea2d5e1a22a594a64b86a0b80e5cedf537a8 /test/compress/functions.js | |
parent | 749a828fc5995836596f1d554f31479d533232fe (diff) | |
download | tracifyjs-8cd95dd2635189b27d1956796d917549e2179bf5.tar.gz tracifyjs-8cd95dd2635189b27d1956796d917549e2179bf5.zip |
enhance `awaits` (#4971)
Diffstat (limited to 'test/compress/functions.js')
-rw-r--r-- | test/compress/functions.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js index 5713a37b..8ab7c1fc 100644 --- a/test/compress/functions.js +++ b/test/compress/functions.js @@ -6208,3 +6208,23 @@ reduce_cross_reference_4_toplevel: { expect: {} expect_stdout: true } + +recursive_collapse: { + options = { + collapse_vars: true, + reduce_vars: true, + } + input: { + console.log(function f(a) { + var b = a && f(); + return b; + }("FAIL") || "PASS"); + } + expect: { + console.log(function f(a) { + var b; + return a && f(); + }("FAIL") || "PASS"); + } + expect_stdout: "PASS" +} |