enhance compress on arrow and async functions (#4616)

This commit is contained in:
Alex Lam S.L
2021-02-06 04:39:46 +00:00
committed by GitHub
parent 739fa266f8
commit 5359900b78
5 changed files with 232 additions and 8 deletions

View File

@@ -248,6 +248,35 @@ issue_2110_2: {
expect_stdout: "function"
}
issue_2110_3: {
options = {
collapse_vars: true,
pure_getters: "strict",
reduce_vars: true,
}
input: {
function g() {
return this;
}
console.log(typeof function() {
function f() {}
f.g = g;
return f.g();
}());
}
expect: {
function g() {
return this;
}
console.log(typeof function() {
function f() {}
f.g = g;
return f.g();
}());
}
expect_stdout: "function"
}
set_immutable_1: {
options = {
collapse_vars: true,