mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-14 21:20:42 +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:
|
else:
|
||||||
result = a
|
result = a
|
||||||
result.typ = n.typ
|
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:
|
of tyFloat..tyFloat64:
|
||||||
case skipTypes(a.typ, abstractRange).kind
|
case skipTypes(a.typ, abstractRange).kind
|
||||||
of tyInt..tyInt64, tyEnum, tyBool, tyChar:
|
of tyInt..tyInt64, tyEnum, tyBool, tyChar:
|
||||||
|
|||||||
Reference in New Issue
Block a user