diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2019-10-30 06:34:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-30 06:34:54 +0800 |
commit | f1eb03f2c0f860a963b2f61c5f8565d8703a18cb (patch) | |
tree | e03cc18f5043bef0f2632a681ffb1865337955f9 /test/compress/dead-code.js | |
parent | 0f4cfa877a9f14a75b219c04947ce5984772d8ba (diff) | |
download | tracifyjs-f1eb03f2c0f860a963b2f61c5f8565d8703a18cb.tar.gz tracifyjs-f1eb03f2c0f860a963b2f61c5f8565d8703a18cb.zip |
enhance `dead_code` (#3551)
Diffstat (limited to 'test/compress/dead-code.js')
-rw-r--r-- | test/compress/dead-code.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/compress/dead-code.js b/test/compress/dead-code.js index 190a3243..501d55ec 100644 --- a/test/compress/dead-code.js +++ b/test/compress/dead-code.js @@ -1013,3 +1013,32 @@ issue_3406: { } expect_stdout: "true" } + +function_assign: { + options = { + dead_code: true, + } + input: { + console.log(function() { + var a = "PASS"; + function h(c) { + return c; + } + h.p = function(b) { + return b; + }.p = a; + return h; + }().p); + } + expect: { + console.log(function() { + var a = "PASS"; + function h(c) { + return c; + } + h.p = a; + return h; + }().p); + } + expect_stdout: "PASS" +} |