diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/reduce_vars.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js index 836d7fe2..815dff32 100644 --- a/test/compress/reduce_vars.js +++ b/test/compress/reduce_vars.js @@ -5545,3 +5545,33 @@ issue_2919: { } expect_stdout: "function" } + +issue_2992: { + options = { + evaluate: true, + reduce_vars: true, + } + input: { + var c = "PASS"; + (function f(b) { + switch (0) { + case 0: + case b = 1: + b && (c = "FAIL"); + } + })(); + console.log(c); + } + expect: { + var c = "PASS"; + (function f(b) { + switch (0) { + case 0: + case b = 1: + b && (c = "FAIL"); + } + })(); + console.log(c); + } + expect_stdout: "PASS" +} |