mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
fixes #2731
This commit is contained in:
@@ -474,7 +474,7 @@ proc changeType(n: PNode, newType: PType, check: bool) =
|
||||
addSon(a, m)
|
||||
changeType(m, tup.sons[i], check)
|
||||
of nkCharLit..nkUInt64Lit:
|
||||
if check:
|
||||
if check and n.kind != nkUInt64Lit:
|
||||
let value = n.intVal
|
||||
if value < firstOrd(newType) or value > lastOrd(newType):
|
||||
localError(n.info, errGenerated, "cannot convert " & $value &
|
||||
|
||||
Reference in New Issue
Block a user