From 8cd95dd2635189b27d1956796d917549e2179bf5 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Fri, 28 May 2021 01:47:37 +0100 Subject: enhance `awaits` (#4971) --- test/compress/functions.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test/compress/functions.js') 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" +} -- cgit v1.2.3