checker: change the warning more than 1000 possibilities in match range to a notice (#19862)

This commit is contained in:
lemon 2023-11-15 06:46:10 +09:00 committed by GitHub
parent b7400fc058
commit dd81cb98c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {