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.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js
index 4ed0dc1b..c2ab23f6 100644
--- a/test/compress/functions.js
+++ b/test/compress/functions.js
@@ -5115,3 +5115,29 @@ issue_4233: {
}
expect_stdout: "number"
}
+
+issue_4259: {
+ options = {
+ collapse_vars: true,
+ functions: true,
+ reduce_vars: true,
+ toplevel: true,
+ unused: true,
+ }
+ input: {
+ var a = function b() {
+ var c = b;
+ for (b in c);
+ };
+ a();
+ console.log(typeof a);
+ }
+ expect: {
+ function a() {
+ for (a in a);
+ }
+ a();
+ console.log(typeof a);
+ }
+ expect_stdout: "function"
+}