v.checker: small cleanup for incomplete match errors
parent
72c56ccc85
commit
b9771ea120
|
@ -6242,8 +6242,10 @@ fn (mut c Checker) match_exprs(mut node ast.MatchExpr, cond_type_sym ast.TypeSym
|
|||
} else {
|
||||
remaining := unhandled.len - c.match_exhaustive_cutoff_limit
|
||||
err_details += unhandled[0..c.match_exhaustive_cutoff_limit].join(', ')
|
||||
if remaining > 0 {
|
||||
err_details += ', and $remaining others ...'
|
||||
}
|
||||
}
|
||||
err_details += ' or `else {}` at the end)'
|
||||
} else {
|
||||
err_details += ' (add `else {}` at the end)'
|
||||
|
|
Loading…
Reference in New Issue