From 98369bb1f8c8fa9594714a732537147af065661c Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Wed, 21 Jan 2026 20:34:17 +0800 Subject: [PATCH] fixes --- compiler/sigmatch.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 31b4b5c1e2..caf552e743 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -624,12 +624,15 @@ proc isRangeSupertype(conf: ConfigRef; wider, narrower: PType): bool = let narrowFirst = firstOrd(conf, narrower) let narrowLast = lastOrd(conf, narrower) result = narrowFirst >= wideFirst and narrowLast <= wideLast - else: + elif not narrower.isOrdinalType: let wideFirst = firstFloat(wider) let wideLast = lastFloat(wider) let narrowFirst = firstFloat(narrower) let narrowLast = lastFloat(narrower) result = narrowFirst >= wideFirst and narrowLast <= wideLast + else: + # int -> float ranges; ignore for now + result = true proc shouldWarnRangeConversion(conf: ConfigRef; formalType, argType: PType): bool = ## Determine if an implicit range conversion should warn