From c0085e6b035296e0940084f78c19f48376b9f3ff Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 5 Feb 2026 16:58:30 +0800 Subject: [PATCH] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- compiler/sempass2.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim index da3f603685..ae8c466a45 100644 --- a/compiler/sempass2.nim +++ b/compiler/sempass2.nim @@ -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