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.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js
index 02b4ab39..7f35de76 100644
--- a/test/compress/functions.js
+++ b/test/compress/functions.js
@@ -1447,3 +1447,33 @@ recursive_inline: {
}
expect: {}
}
+
+issue_2657: {
+ options = {
+ inline: true,
+ reduce_vars: true,
+ sequences: true,
+ unused: true,
+ }
+ input: {
+ "use strict";
+ console.log(function f() {
+ return h;
+ function g(b) {
+ return b || b();
+ }
+ function h(a) {
+ g(a);
+ return a;
+ }
+ }()(42));
+ }
+ expect: {
+ "use strict";
+ console.log(function(a) {
+ return b = a, b || b(), a;
+ var b;
+ }(42));
+ }
+ expect_stdout: "42"
+}