diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2019-11-19 02:30:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-19 02:30:52 +0800 |
commit | c289ba1139781f5619ec92136c2ceaac7d745ba7 (patch) | |
tree | f7731128d509e33ea793a902afe1f4f92b818ee0 /test/compress/collapse_vars.js | |
parent | 02cc4a0d0370a79cb868199c58a03cfcd0e4d299 (diff) | |
download | tracifyjs-c289ba1139781f5619ec92136c2ceaac7d745ba7.tar.gz tracifyjs-c289ba1139781f5619ec92136c2ceaac7d745ba7.zip |
fix corner case in `collapse_vars` (#3597)
fixes #3596
Diffstat (limited to 'test/compress/collapse_vars.js')
-rw-r--r-- | test/compress/collapse_vars.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/compress/collapse_vars.js b/test/compress/collapse_vars.js index 6ad02b21..81f24175 100644 --- a/test/compress/collapse_vars.js +++ b/test/compress/collapse_vars.js @@ -6549,3 +6549,21 @@ issue_3581_2: { } expect_stdout: "PASS PASS" } + +issue_3596: { + options = { + collapse_vars: true, + pure_getters: "strict", + } + input: { + console.log(function f() { + return f[[ ][f.undefined = 42, 0]] += !1; + }()); + } + expect: { + console.log(function f() { + return f[[ ][f.undefined = 42, 0]] += !1; + }()); + } + expect_stdout: "42" +} |