fixes a compiler crash; refs #4699

This commit is contained in:
Andreas Rumpf 2016-09-03 11:11:43 +02:00
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: