diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-06-01 13:55:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-01 20:55:23 +0800 |
commit | b24eb22c6b0ebbb3ec0274d76571864762c6393f (patch) | |
tree | a182570b215e7c27f675f56dc5a8d5641d614899 /test/compress/collapse_vars.js | |
parent | 06ba4e2ce806a7dbf7a16391a36955ab5b3a25bb (diff) | |
download | tracifyjs-b24eb22c6b0ebbb3ec0274d76571864762c6393f.tar.gz tracifyjs-b24eb22c6b0ebbb3ec0274d76571864762c6393f.zip |
enhance `reduce_vars` (#3942)
Diffstat (limited to 'test/compress/collapse_vars.js')
-rw-r--r-- | test/compress/collapse_vars.js | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/test/compress/collapse_vars.js b/test/compress/collapse_vars.js index 6244e03f..546e0d3b 100644 --- a/test/compress/collapse_vars.js +++ b/test/compress/collapse_vars.js @@ -3001,8 +3001,6 @@ issue_2298: { expect: { !function() { (function() { - var a = undefined; - var undefined = a++; try { !function(b) { (void 0)[1] = "foo"; @@ -3836,20 +3834,19 @@ issue_2436_3: { }(o)); } expect: { - var o = { - a: 1, - b: 2, - }; console.log(function(c) { - o = { + ({ a: 3, b: 4, - }; + }); return { x: c.a, y: c.b, }; - }(o)); + }({ + a: 1, + b: 2, + })); } expect_stdout: true } @@ -4071,16 +4068,15 @@ issue_2436_10: { }(o).join(" ")); } expect: { - var o = { - a: 1, - b: 2, - }; function f(n) { - o = { b: 3 }; + ({ b: 3 }); return n; } console.log([ - (c = o).a, + (c = { + a: 1, + b: 2, + }).a, f(c.b), c.b, ].join(" ")); |