diff options
-rw-r--r-- | test/compress/functions.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js index 0607e85c..1208b62d 100644 --- a/test/compress/functions.js +++ b/test/compress/functions.js @@ -3370,3 +3370,33 @@ issue_3512: { } expect_stdout: "PASS" } + +issue_3562: { + options = { + collapse_vars: true, + reduce_vars: true, + } + input: { + var a = "PASS"; + function f(b) { + f = function() { + console.log(b); + }; + return "FAIL"; + } + a = f(a); + f(a); + } + expect: { + var a = "PASS"; + function f(b) { + f = function() { + console.log(b); + }; + return "FAIL"; + } + a = f(a); + f(a); + } + expect_stdout: "PASS" +} |