fixes a compiler crash; refs #4699

This commit is contained in:
Andreas Rumpf
2016-09-03 11:11:43 +02:00
parent 0e9d12639e
commit c2df609cd6

View File

@@ -514,7 +514,8 @@ proc foldConv*(n, a: PNode; check = false): PNode =
else:
result = a
result.typ = n.typ
if check: rangeCheck(n, result.intVal)
if check and result.kind in {nkCharLit..nkUInt64Lit}:
rangeCheck(n, result.intVal)
of tyFloat..tyFloat64:
case skipTypes(a.typ, abstractRange).kind
of tyInt..tyInt64, tyEnum, tyBool, tyChar: