improve if_return (#2558)

`return void x()` => `x()`
This commit is contained in:
Alex Lam S.L
2017-12-07 01:01:52 +08:00
committed by GitHub
parent b9f3ddfb30
commit 3dd495ecdd
2 changed files with 45 additions and 7 deletions

View File

@@ -122,3 +122,25 @@ return_undefined: {
}
}
}
return_void: {
options = {
if_return: true,
inline: true,
reduce_vars: true,
unused: true,
}
input: {
function f() {
function g() {
h();
}
return g();
}
}
expect: {
function f() {
h();
}
}
}