Skip to content

Commit

Permalink
more tests for #3562 (#3565)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlamsl committed Nov 1, 2019
1 parent 24bb288 commit dcbf223
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions test/compress/functions.js
Expand Up @@ -3370,3 +3370,33 @@ issue_3512: {
}
expect_stdout: "PASS"
}

issue_3562: {
options = {
collapse_vars: true,
reduce_vars: true,
}
input: {
var a = "PASS";
function f(b) {
f = function() {
console.log(b);
};
return "FAIL";
}
a = f(a);
f(a);
}
expect: {
var a = "PASS";
function f(b) {
f = function() {
console.log(b);
};
return "FAIL";
}
a = f(a);
f(a);
}
expect_stdout: "PASS"
}

0 comments on commit dcbf223

Please sign in to comment.