diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2019-11-26 01:51:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-26 01:51:04 +0800 |
commit | 6768e6578f0e39389fc6499ddf2b7282e3621d7c (patch) | |
tree | 9c46481d882a1461e7e3d4fbdc5e4176414427b8 /test/compress/functions.js | |
parent | 48a0f6fe411c09ed3250974332266ed2495832a9 (diff) | |
download | tracifyjs-6768e6578f0e39389fc6499ddf2b7282e3621d7c.tar.gz tracifyjs-6768e6578f0e39389fc6499ddf2b7282e3621d7c.zip |
inline functions with directives more effectively (#3604)
Diffstat (limited to 'test/compress/functions.js')
-rw-r--r-- | test/compress/functions.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js index 2af14a62..4f3139b1 100644 --- a/test/compress/functions.js +++ b/test/compress/functions.js @@ -3568,3 +3568,29 @@ pr_3592_2: { } expect_stdout: "PASS" } + +inline_use_strict: { + options = { + evaluate: true, + inline: true, + reduce_vars: true, + sequences: true, + side_effects: true, + unused: true, + } + input: { + console.log(function() { + "use strict"; + return function() { + "use strict"; + var a = "foo"; + a += "bar"; + return a; + }; + }()()); + } + expect: { + console.log("foobar"); + } + expect_stdout: "foobar" +} |