mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v.checker: small cleanup for incomplete match errors
This commit is contained in:
parent
72c56ccc85
commit
b9771ea120
@ -6242,8 +6242,10 @@ fn (mut c Checker) match_exprs(mut node ast.MatchExpr, cond_type_sym ast.TypeSym
|
|||||||
} else {
|
} else {
|
||||||
remaining := unhandled.len - c.match_exhaustive_cutoff_limit
|
remaining := unhandled.len - c.match_exhaustive_cutoff_limit
|
||||||
err_details += unhandled[0..c.match_exhaustive_cutoff_limit].join(', ')
|
err_details += unhandled[0..c.match_exhaustive_cutoff_limit].join(', ')
|
||||||
|
if remaining > 0 {
|
||||||
err_details += ', and $remaining others ...'
|
err_details += ', and $remaining others ...'
|
||||||
}
|
}
|
||||||
|
}
|
||||||
err_details += ' or `else {}` at the end)'
|
err_details += ' or `else {}` at the end)'
|
||||||
} else {
|
} else {
|
||||||
err_details += ' (add `else {}` at the end)'
|
err_details += ' (add `else {}` at the end)'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user