This commit is contained in:
Araq 2017-11-23 02:32:51 +01:00
commit 8a601669ef
6 changed files with 20 additions and 6 deletions

View file

@ -1693,7 +1693,7 @@ proc genRangeChck(p: BProc, n: PNode, d: var TLoc, magic: string) =
proc genConv(p: BProc, e: PNode, d: var TLoc) =
let destType = e.typ.skipTypes({tyVar, tyGenericInst, tyAlias})
if compareTypes(destType, e.sons[1].typ, dcEqIgnoreDistinct):
if sameBackendType(destType, e.sons[1].typ):
expr(p, e.sons[1], d)
else:
genSomeCast(p, e, d)