aboutsummaryrefslogtreecommitdiff
path: root/test/compress/functions.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/functions.js')
-rw-r--r--test/compress/functions.js37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js
index 68ff709b..e43efcea 100644
--- a/test/compress/functions.js
+++ b/test/compress/functions.js
@@ -5912,3 +5912,40 @@ issue_4753_2: {
}
expect_stdout: "PASS"
}
+
+issue_4788: {
+ options = {
+ evaluate: true,
+ functions: true,
+ keep_fnames: true,
+ reduce_vars: true,
+ toplevel: true,
+ unused: true,
+ }
+ input: {
+ function f() {
+ var a = function g() {
+ if (0) {
+ var g = 42;
+ f();
+ }
+ g || console.log("PASS");
+ };
+ a(a);
+ }
+ f();
+ }
+ expect: {
+ (function f() {
+ function a() {
+ if (0) {
+ var g = 42;
+ f();
+ }
+ g || console.log("PASS");
+ }
+ a();
+ })();
+ }
+ expect_stdout: "PASS"
+}