improve if_return (#2727)

This commit is contained in:
Alex Lam S.L
2018-01-05 20:24:30 +08:00
committed by GitHub
parent 7f2a591c7e
commit b82feb9302
2 changed files with 27 additions and 2 deletions

View File

@@ -372,3 +372,27 @@ if_var_return: {
}
}
}
if_if_return_return: {
options = {
conditionals: true,
if_return: true,
}
input: {
function f(a, b) {
if (a) {
if (b)
return b;
return;
}
g();
}
}
expect: {
function f(a, b) {
if (a)
return b || void 0;
g();
}
}
}