enhance reduce_vars (#5636)

This commit is contained in:
Alex Lam S.L
2022-08-30 09:00:43 +01:00
committed by GitHub
parent 15b608f74c
commit 10bc86ba10
7 changed files with 109 additions and 40 deletions

View File

@@ -1878,7 +1878,7 @@ issue_2846: {
var c = function(a, b) {
a = 0;
b && b(a);
return a++;
return +a;
}();
console.log(c);
}
@@ -2976,14 +2976,12 @@ issue_4025: {
console.log(a, b, d);
}
expect: {
var c = 0;
try {
console.log(c);
console.log(0);
} finally {
var d = c + 1;
c = 0;
0;
}
console.log(1, 1, d);
console.log(1, 1, 1);
}
expect_stdout: [
"0",
@@ -3696,7 +3694,7 @@ issue_5224: {
(function() {
var a = "FAIL 1";
null;
a = console.log(a);
console.log(a);
})(function() {
console.log(1 / 0);
a;