aboutsummaryrefslogtreecommitdiff
path: root/test/compress/drop-unused.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/drop-unused.js')
-rw-r--r--test/compress/drop-unused.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/compress/drop-unused.js b/test/compress/drop-unused.js
index 275e0f76..90206ec6 100644
--- a/test/compress/drop-unused.js
+++ b/test/compress/drop-unused.js
@@ -1413,3 +1413,24 @@ issue_2516_2: {
Baz(2);
}
}
+
+defun_lambda_same_name: {
+ options = {
+ toplevel: true,
+ unused: true,
+ }
+ input: {
+ function f(n) {
+ return n ? n * f(n - 1) : 1;
+ }
+ console.log(function f(n) {
+ return n ? n * f(n - 1) : 1;
+ }(5));
+ }
+ expect: {
+ console.log(function f(n) {
+ return n ? n * f(n - 1) : 1;
+ }(5));
+ }
+ expect_stdout: "120"
+}