aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/reduce_vars.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js
index 33175d1b..4009c35b 100644
--- a/test/compress/reduce_vars.js
+++ b/test/compress/reduce_vars.js
@@ -5360,3 +5360,26 @@ issue_2799_2: {
}
expect_stdout: "PASS"
}
+
+issue_2836: {
+ options = {
+ reduce_vars: true,
+ toplevel: true,
+ unused: true,
+ }
+ input: {
+ function f() {
+ return "FAIL";
+ }
+ console.log(f());
+ function f() {
+ return "PASS";
+ }
+ }
+ expect: {
+ console.log(function() {
+ return "PASS";
+ }());
+ }
+ expect_stdout: "PASS"
+}