mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 06:18:51 +00:00
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -176,7 +176,7 @@ proc shouldWarnRangeConversion(conf: ConfigRef; formalType, argType: PType): boo
|
||||
if f.kind == tyRange:
|
||||
# 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
|
||||
if a.kind == tyInt and f.sym != nil and f.sym.owner != nil and
|
||||
sfSystemModule in f.sym.owner.flagsImpl and
|
||||
(f.sym.name.s == "Positive" or
|
||||
f.sym.name.s == "Natural"):
|
||||
|
||||
Reference in New Issue
Block a user