diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/reduce_vars.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js index 6cc575f1..67d473dd 100644 --- a/test/compress/reduce_vars.js +++ b/test/compress/reduce_vars.js @@ -7006,3 +7006,30 @@ flatten_iife: { } expect_stdout: "PASS" } + +issue_3844: { + options = { + evaluate: true, + reduce_vars: true, + toplevel: true, + } + input: { + console.log(function() { + if (!console) switch (A = 0) { + case console.log("FAIL"): + return; + } + return typeof A; + }()); + } + expect: { + console.log(function() { + if (!console) switch (A = 0) { + case console.log("FAIL"): + return; + } + return typeof A; + }()); + } + expect_stdout: "undefined" +} |