diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-01-10 16:01:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-11 00:01:49 +0800 |
commit | dbfa5d4d14c1984da94c2435f349ecbd3dbb36e9 (patch) | |
tree | 134c227fce73b2c0cc73f9833d074a8ba367edf6 /test/compress | |
parent | ba54d074d8f434148a4f9ab5f59fcb70ff08dda9 (diff) | |
download | tracifyjs-dbfa5d4d14c1984da94c2435f349ecbd3dbb36e9.tar.gz tracifyjs-dbfa5d4d14c1984da94c2435f349ecbd3dbb36e9.zip |
fix corner case in `ie8` (#4532)
fixes #4531
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/let.js | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/test/compress/let.js b/test/compress/let.js index f52dcb50..7a9db169 100644 --- a/test/compress/let.js +++ b/test/compress/let.js @@ -1282,3 +1282,60 @@ issue_4438: { expect_stdout: "PASS" node_version: ">=4" } + +issue_4531_1: { + mangle = { + ie8: true, + toplevel: true, + } + input: { + "use strict"; + var a; + console.log(function a() { + let a; + var b; + }()); + } + expect: { + "use strict"; + var o; + console.log(function o() { + let o; + var t; + }()); + } + expect_stdout: "undefined" + node_version: ">=4" +} + +issue_4531_2: { + options = { + evaluate: true, + ie8: true, + toplevel: true, + } + mangle = { + ie8: true, + toplevel: true, + } + input: { + "use strict"; + var a = console; + console.log(typeof a, function a() { + let { [console]: a } = 0 && a; + var b = console; + while (!b); + }()); + } + expect: { + "use strict"; + var o = console; + console.log(typeof o, function o() { + let { [console]: o } = 0; + var e = console; + while (!e); + }()); + } + expect_stdout: "object undefined" + node_version: ">=6" +} |