checker: minor cleanup in check_or_expr() (#9635)
parent
4f6dde4ac2
commit
e654d61541
|
@ -2397,7 +2397,6 @@ pub fn (mut c Checker) check_or_expr(or_expr ast.OrExpr, ret_type ast.Type, expr
|
||||||
if ret_type != ast.void_type {
|
if ret_type != ast.void_type {
|
||||||
// x := f() or {}
|
// x := f() or {}
|
||||||
c.error('assignment requires a non empty `or {}` block', or_expr.pos)
|
c.error('assignment requires a non empty `or {}` block', or_expr.pos)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
// allow `f() or {}`
|
// allow `f() or {}`
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue