summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorTanguy Cizain <tanguycizain@gmail.com>2021-04-17 15:34:00 +0200
committerGitHub <noreply@github.com>2021-04-17 15:34:00 +0200
commit8e124da75d7b3cafe27c197a027d34f1aca012e3 (patch)
tree8ddea213de4de3ae4435201d10498955b3b7d4fb /compiler
parent5c9c1988f6bb92e8cfdc639fc0f83e78cb5efbd2 (diff)
downloadNim-8e124da75d7b3cafe27c197a027d34f1aca012e3.tar.gz
fix range to unsigned conversion (#17754)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/sigmatch.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index 6a36c1381..b2003c0a8 100644
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -409,7 +409,7 @@ proc handleRange(f, a: PType, min, max: TTypeKind): TTypeRelation =
     elif a.kind == tyRange and
       # Make sure the conversion happens between types w/ same signedness
       (f.kind in {tyInt..tyInt64} and a[0].kind in {tyInt..tyInt64} or
-       f.kind in {tyUInt8..tyUInt32} and a[0].kind in {tyUInt8..tyInt32}) and
+       f.kind in {tyUInt8..tyUInt32} and a[0].kind in {tyUInt8..tyUInt32}) and
       a.n[0].intVal >= firstOrd(nil, f) and a.n[1].intVal <= lastOrd(nil, f):
       # passing 'nil' to firstOrd/lastOrd here as type checking rules should
       # not depend on the target integer size configurations!