enhance if_return (#5330)

This commit is contained in:
Alex Lam S.L
2022-02-02 00:13:38 +00:00
committed by GitHub
parent 77552d9e69
commit aad5d6e122
2 changed files with 29 additions and 8 deletions

View File

@@ -395,7 +395,31 @@ if_var_return_2: {
}
}
if_var_return_3: {
if_var_retrn_3: {
options = {
conditionals: true,
if_return: true,
sequences: true,
}
input: {
f(function() {
var a = w();
if (x())
return y(a);
z();
});
}
expect: {
f(function() {
var a = w();
if (x())
return y(a);
z();
});
}
}
if_var_return_4: {
options = {
conditionals: true,
if_return: true,