diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-06-15 01:28:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-15 01:28:44 +0800 |
commit | ae9f56be109ccc27003868e997143823957f874d (patch) | |
tree | 9fc5f207cf85bb8d1a2480c37e51422f0fa5f835 /test/compress | |
parent | 9aed0e3a734f4fd615ed539d8159e53be89af7e2 (diff) | |
download | tracifyjs-ae9f56be109ccc27003868e997143823957f874d.tar.gz tracifyjs-ae9f56be109ccc27003868e997143823957f874d.zip |
fix corner case in `evaluate` (#3998)
fixes #3997
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/evaluate.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/compress/evaluate.js b/test/compress/evaluate.js index 4fecd701..dd94f613 100644 --- a/test/compress/evaluate.js +++ b/test/compress/evaluate.js @@ -2812,3 +2812,24 @@ operator_in: { "true", ] } + +issue_3997: { + options = { + evaluate: true, + reduce_vars: true, + toplevel: true, + } + input: { + var a = function f(b) { + return b[b += this] = b; + }(0); + console.log(typeof a); + } + expect: { + var a = function f(b) { + return b[b += this] = b; + }(0); + console.log(typeof a); + } + expect_stdout: "string" +} |