diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-11-08 10:50:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-08 18:50:08 +0800 |
commit | 810cd40356f6fa1ddbc9c97a0df95bd1d94a2720 (patch) | |
tree | 5c5c728f40005fc194ec5a3ea08c7dbad5795ea4 /test | |
parent | 1cbd07e7897bcbb879921c63b9794f7a278ca5a6 (diff) | |
download | tracifyjs-810cd40356f6fa1ddbc9c97a0df95bd1d94a2720.tar.gz tracifyjs-810cd40356f6fa1ddbc9c97a0df95bd1d94a2720.zip |
fix corner case in `inline` (#4266)
fixes #4265
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/functions.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js index 3b57fb2b..686e7a50 100644 --- a/test/compress/functions.js +++ b/test/compress/functions.js @@ -5183,3 +5183,34 @@ issue_4261: { } expect_stdout: true } + +issue_4265: { + options = { + conditionals: true, + dead_code: true, + inline: true, + sequences: true, + } + input: { + function f() { + console; + if ([ function() { + return this + console.log(a); + a; + var a; + }() ]); + return 0; + } + f(); + } + expect: { + function f() { + return console, function() { + return console.log(a); + var a; + }(), 0; + } + f(); + } + expect_stdout: "undefined" +} |