mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
checker: change the warning more than 1000 possibilities in match range
to a notice (#19862)
This commit is contained in:
parent
b7400fc058
commit
dd81cb98c6
1 changed files with 1 additions and 1 deletions
|
@ -281,7 +281,7 @@ fn (mut c Checker) match_exprs(mut node ast.MatchExpr, cond_type_sym ast.TypeSym
|
||||||
if both_low_and_high_are_known {
|
if both_low_and_high_are_known {
|
||||||
high_low_cutoff := 1000
|
high_low_cutoff := 1000
|
||||||
if high - low > high_low_cutoff {
|
if high - low > high_low_cutoff {
|
||||||
c.warn('more than ${high_low_cutoff} possibilities (${low} ... ${high}) in match range',
|
c.note('more than ${high_low_cutoff} possibilities (${low} ... ${high}) in match range may affect compile time',
|
||||||
branch.pos)
|
branch.pos)
|
||||||
}
|
}
|
||||||
for i in low .. high + 1 {
|
for i in low .. high + 1 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue