diff options
Diffstat (limited to 'test/compress/merge_vars.js')
-rw-r--r-- | test/compress/merge_vars.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/compress/merge_vars.js b/test/compress/merge_vars.js index 6ada9297..b61b486d 100644 --- a/test/compress/merge_vars.js +++ b/test/compress/merge_vars.js @@ -3092,3 +3092,35 @@ issue_4237_2: { } expect_stdout: "PASS" } + +issue_4253: { + options = { + merge_vars: true, + toplevel: true, + } + input: { + switch (0) { + default: + var a = "FAIL"; + a = a && a; + try { + break; + } catch (e) {} + var b = 42; + } + console.log(b); + } + expect: { + switch (0) { + default: + var a = "FAIL"; + a = a && a; + try { + break; + } catch (e) {} + var b = 42; + } + console.log(b); + } + expect_stdout: "undefined" +} |