aboutsummaryrefslogtreecommitdiff
path: root/test/compress/reduce_vars.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/reduce_vars.js')
-rw-r--r--test/compress/reduce_vars.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js
index 394bb586..bf1155b7 100644
--- a/test/compress/reduce_vars.js
+++ b/test/compress/reduce_vars.js
@@ -4899,3 +4899,27 @@ do_while: {
}
expect_stdout: "PASS"
}
+
+issue_2598: {
+ options = {
+ reduce_funcs: true,
+ reduce_vars: true,
+ toplevel: true,
+ unused: true,
+ }
+ input: {
+ function f() {}
+ function g(a) {
+ return a || f;
+ }
+ console.log(g(false) === g(null));
+ }
+ expect: {
+ function f() {}
+ function g(a) {
+ return a || f;
+ }
+ console.log(g(false) === g(null));
+ }
+ expect_stdout: "true"
+}