This commit is contained in:
kbkpbot 2025-09-03 08:23:14 +08:00
parent b442fc6349
commit 6010a2838b

View file

@ -228,6 +228,7 @@ fn (mut c Checker) match_expr(mut node ast.MatchExpr) ast.Type {
} else { } else {
c.stmts(mut branch.stmts) c.stmts(mut branch.stmts)
} }
}
c.smartcast_mut_pos = token.Pos{} c.smartcast_mut_pos = token.Pos{}
c.smartcast_cond_pos = token.Pos{} c.smartcast_cond_pos = token.Pos{}
if node.is_expr { if node.is_expr {
@ -411,7 +412,6 @@ fn (mut c Checker) match_expr(mut node ast.MatchExpr) ast.Type {
} }
} }
} }
}
first_iteration = false first_iteration = false
if has_return := c.has_return(branch.stmts) { if has_return := c.has_return(branch.stmts) {
if has_return { if has_return {