* fixes #13744

* improve style

Co-authored-by: cooldome <ariabushenko@gmail.ru>
This commit is contained in:
cooldome 2020-03-25 13:44:52 +00:00 • committed by GitHub
commit 182d3c16e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 44 additions and 1 deletions

View file

@ -462,7 +462,7 @@ proc transformConv(c: PTransf, n: PNode): PNode =
var dest = skipTypes(n.typ, abstractVarRange)
var source = skipTypes(n[1].typ, abstractVarRange)
case dest.kind
of tyInt..tyInt64, tyEnum, tyChar, tyBool, tyUInt8..tyUInt32:
of tyInt..tyInt64, tyEnum, tyChar, tyUInt8..tyUInt32:
# we don't include uint and uint64 here as these are no ordinal types ;-)
if not isOrdinalType(source):
# float -> int conversions. ugh.