From afad61c220280ef6ab6362dc5cadbab8ab0b20fc Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 26 Jun 2015 00:05:14 +0200 Subject: fixes #2731 --- compiler/semexprs.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index cd6ba3753..45f6f04f9 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -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 & -- cgit 1.4.1-2-gfad0