1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: minor cleanup in check_or_last_stmt() (#13763)

This commit is contained in:
yuyi 2022-03-19 04:27:53 +08:00 committed by GitHub
parent 1734e72638
commit 3e41be1ff4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1531,9 +1531,7 @@ fn (mut c Checker) check_or_last_stmt(stmt ast.Stmt, ret_type ast.Type, expr_ret
stmt.pos)
}
}
} else {
match stmt {
ast.ExprStmt {
} else if stmt is ast.ExprStmt {
match stmt.expr {
ast.IfExpr {
for branch in stmt.expr.branches {
@ -1565,9 +1563,6 @@ fn (mut c Checker) check_or_last_stmt(stmt ast.Stmt, ret_type ast.Type, expr_ret
}
}
}
else {}
}
}
}
pub fn (mut c Checker) selector_expr(mut node ast.SelectorExpr) ast.Type {