diff options
Diffstat (limited to 'test/compress/const.js')
-rw-r--r-- | test/compress/const.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/compress/const.js b/test/compress/const.js index 4306fff2..fce6ebea 100644 --- a/test/compress/const.js +++ b/test/compress/const.js @@ -1498,3 +1498,40 @@ issue_4691: { } expect_stdout: "PASS" } + +issue_4848: { + options = { + if_return: true, + } + input: { + function f(a) { + a(function() { + console.log(b); + }); + if (!console) + return; + const b = "PASS"; + } + var g; + f(function(h) { + g = h; + }); + g(); + } + expect: { + function f(a) { + a(function() { + console.log(b); + }); + if (!console) + return; + const b = "PASS"; + } + var g; + f(function(h) { + g = h; + }); + g(); + } + expect_stdout: "PASS" +} |