aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/drop-unused.js39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/compress/drop-unused.js b/test/compress/drop-unused.js
index fabf8d9f..10ca5499 100644
--- a/test/compress/drop-unused.js
+++ b/test/compress/drop-unused.js
@@ -805,3 +805,42 @@ issue_1656: {
}
expect_exact: "for (;;) ;"
}
+
+issue_1709: {
+ options = {
+ unused: true,
+ }
+ input: {
+ console.log(
+ function x() {
+ var x = 1;
+ return x;
+ }(),
+ function y() {
+ const y = 2;
+ return y;
+ }(),
+ function z() {
+ function z() {}
+ return z;
+ }()
+ );
+ }
+ expect: {
+ console.log(
+ function() {
+ var x = 1;
+ return x;
+ }(),
+ function() {
+ const y = 2;
+ return y;
+ }(),
+ function() {
+ function z() {}
+ return z;
+ }()
+ );
+ }
+ expect_stdout: true
+}