diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2018-02-02 18:08:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-02 18:08:56 +0800 |
commit | b16380d66961f408932de781a3425d2992ec51b3 (patch) | |
tree | ac677b1a7a11fe244ac14735522b2475e62959d5 /test/compress | |
parent | 334b07a3dba84ceadbc88c068667caf144f46efb (diff) | |
download | tracifyjs-b16380d66961f408932de781a3425d2992ec51b3.tar.gz tracifyjs-b16380d66961f408932de781a3425d2992ec51b3.zip |
fix missing corner case in #2855 (#2868)
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/collapse_vars.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/compress/collapse_vars.js b/test/compress/collapse_vars.js index f56face6..948389b1 100644 --- a/test/compress/collapse_vars.js +++ b/test/compress/collapse_vars.js @@ -4191,6 +4191,31 @@ return_3: { expect_stdout: "0" } +return_4: { + options = { + collapse_vars: true, + } + input: { + var a = "FAIL"; + (function(b) { + a = "PASS"; + return; + b(a); + })(); + console.log(a); + } + expect: { + var a = "FAIL"; + (function(b) { + a = "PASS"; + return; + b(a); + })(); + console.log(a); + } + expect_stdout: "PASS" +} + issue_2858: { options = { collapse_vars: true, |