Skip to content

Commit

Permalink
checker: change the warning `more than 1000 possibilities in match ra…
Browse files Browse the repository at this point in the history
…nge` to a notice (#19862)
  • Loading branch information
lemoncmd committed Nov 14, 2023
1 parent b7400fc commit dd81cb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/v/checker/match.v
Expand Up @@ -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 {
high_low_cutoff := 1000
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)
}
for i in low .. high + 1 {
Expand Down

0 comments on commit dd81cb9

Please sign in to comment.