diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-03-08 03:31:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-08 03:31:51 +0800 |
commit | bd6dee52abd607244d89f606a729e811a9b0b478 (patch) | |
tree | fc9cc388d3f8785f4616e1744156d6b90219169a /test | |
parent | 144052ca491144c65adc9d081b17ce100e3de59d (diff) | |
download | tracifyjs-bd6dee52abd607244d89f606a729e811a9b0b478.tar.gz tracifyjs-bd6dee52abd607244d89f606a729e811a9b0b478.zip |
fix return from recursive IIFE (#1570)
`side-effects` did not account for IIFEs being able to reference itself thus making its return value potentially significant
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/issue-1569.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/compress/issue-1569.js b/test/compress/issue-1569.js new file mode 100644 index 00000000..5f0bca34 --- /dev/null +++ b/test/compress/issue-1569.js @@ -0,0 +1,19 @@ +inner_reference: { + options = { + side_effects: true, + } + input: { + !function f(a) { + return a && f(a - 1) + a; + }(42); + !function g(a) { + return a; + }(42); + } + expect: { + !function f(a) { + return a && f(a - 1) + a; + }(42); + !void 0; + } +} |