aboutsummaryrefslogtreecommitdiff
path: root/test/compress/functions.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-05-28 01:47:37 +0100
committerGitHub <noreply@github.com>2021-05-28 08:47:37 +0800
commit8cd95dd2635189b27d1956796d917549e2179bf5 (patch)
treeced7ea2d5e1a22a594a64b86a0b80e5cedf537a8 /test/compress/functions.js
parent749a828fc5995836596f1d554f31479d533232fe (diff)
downloadtracifyjs-8cd95dd2635189b27d1956796d917549e2179bf5.tar.gz
tracifyjs-8cd95dd2635189b27d1956796d917549e2179bf5.zip
enhance `awaits` (#4971)
Diffstat (limited to 'test/compress/functions.js')
-rw-r--r--test/compress/functions.js20
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"
+}