Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
ringabout
2026-02-05 16:58:30 +08:00
committed by GitHub
parent d93595d352
commit c0085e6b03

View File

@@ -177,7 +177,7 @@ proc shouldWarnRangeConversion(conf: ConfigRef; formalType, argType: PType): boo
# Only warn if formal range doesn't fully contain argument range
# Check if the ranges don't perfectly overlap
if a.kind == tyInt and f.sym != nil and f.sym.owner != nil and
sfSystemModule in f.sym.owner.flagsImpl and
sfSystemModule in f.sym.owner.flags and
(f.sym.name.s == "Positive" or
f.sym.name.s == "Natural"):
# Positive and Natural are special cases that we never warn on