summary refs log tree commit diff stats
path: root/compiler/semexprs.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-06-26 00:05:14 +0200
committerAraq <rumpf_a@web.de>2015-06-26 00:05:29 +0200
commitafad61c220280ef6ab6362dc5cadbab8ab0b20fc (patch)
treeaeff86ce91bf5871a4aeab5abe5a82a0885110e1 /compiler/semexprs.nim
parente273c00431dcbe78374d9a625dc4010367919d40 (diff)
downloadNim-afad61c220280ef6ab6362dc5cadbab8ab0b20fc.tar.gz
fixes #2731
Diffstat (limited to 'compiler/semexprs.nim')
-rw-r--r--compiler/semexprs.nim2
1 files changed, 1 insertions, 1 deletions
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 &