diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-02-06 04:39:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-06 12:39:46 +0800 |
commit | 5359900b78fdf3006dafc13a206332d2fb2b1ea4 (patch) | |
tree | 3f6878238a8c69655820811b6c25cede25866d94 /test/compress/pure_getters.js | |
parent | 739fa266f80802f75838cc4053e615b27abcf361 (diff) | |
download | tracifyjs-5359900b78fdf3006dafc13a206332d2fb2b1ea4.tar.gz tracifyjs-5359900b78fdf3006dafc13a206332d2fb2b1ea4.zip |
enhance `compress` on arrow and `async` functions (#4616)
Diffstat (limited to 'test/compress/pure_getters.js')
-rw-r--r-- | test/compress/pure_getters.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/compress/pure_getters.js b/test/compress/pure_getters.js index 58920411..6adc6168 100644 --- a/test/compress/pure_getters.js +++ b/test/compress/pure_getters.js @@ -248,6 +248,35 @@ issue_2110_2: { expect_stdout: "function" } +issue_2110_3: { + options = { + collapse_vars: true, + pure_getters: "strict", + reduce_vars: true, + } + input: { + function g() { + return this; + } + console.log(typeof function() { + function f() {} + f.g = g; + return f.g(); + }()); + } + expect: { + function g() { + return this; + } + console.log(typeof function() { + function f() {} + f.g = g; + return f.g(); + }()); + } + expect_stdout: "function" +} + set_immutable_1: { options = { collapse_vars: true, |