mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
fixes a compiler crash; refs #4699
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user