fix corner cases in keep_fargs & unused (#3618)

This commit is contained in:
Alex Lam S.L
2019-12-02 06:43:54 +08:00
committed by GitHub
parent e915832a36
commit 9a6faf365b
7 changed files with 320 additions and 39 deletions

View File

@@ -815,9 +815,9 @@ issue_1583: {
}
expect: {
function m(t) {
(function() {
(function(e) {
(function() {
return (function() {
return (function(a) {
return function(a) {};
})();
})();
@@ -1329,7 +1329,7 @@ issue_2226_2: {
}(1, 2));
}
expect: {
console.log(function(a) {
console.log(function(a, b) {
return a += 2;
}(1));
}
@@ -1349,7 +1349,7 @@ issue_2226_3: {
}(1, 2));
}
expect: {
console.log(function(a) {
console.log(function(a, b) {
return a += 2;
}(1));
}
@@ -1702,11 +1702,11 @@ chained_3: {
}(1, 2));
}
expect: {
console.log(function(b) {
console.log(function(a, b) {
var c = b;
b++;
return c;
}(2));
}(0, 2));
}
expect_stdout: "2"
}