File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed
Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -2498,7 +2498,7 @@ Compressor.prototype.compress = function(node) {
24982498 hit_index++;
24992499 }
25002500 branch.expression = branch.expression.transform(tt);
2501- if (!replace_all) break;
2501+ if (!replace_all || verify_ref ) break;
25022502 scan_rhs = false;
25032503 }
25042504 }
Original file line number Diff line number Diff line change @@ -10121,3 +10121,30 @@ issue_5643: {
1012110121 }
1012210122 expect_stdout: "42"
1012310123}
10124+
10125+ issue_5719: {
10126+ options = {
10127+ collapse_vars : true ,
10128+ reduce_vars : true ,
10129+ toplevel : true ,
10130+ }
10131+ input: {
10132+ var a = 42 , b ;
10133+ switch ( b = a ) {
10134+ case a :
10135+ case b :
10136+ case a ++ :
10137+ }
10138+ console . log ( a === b ++ ? "PASS" : "FAIL" ) ;
10139+ }
10140+ expect: {
10141+ var a = 42 , b ;
10142+ switch ( b = a ) {
10143+ case a :
10144+ case b :
10145+ case a ++ :
10146+ }
10147+ console . log ( a === b ++ ? "PASS" : "FAIL" ) ;
10148+ }
10149+ expect_stdout: "PASS"
10150+ }
You can’t perform that action at this time.
0 commit comments