This commit is contained in:
Araq
2016-10-08 10:25:55 +02:00
parent 7906527297
commit 3a5dfd6a03

View File

@@ -136,8 +136,10 @@ proc isCastable(dst, src: PType): bool =
# tyProc, tySet, tyEnum, tyBool, tyChar}
if skipTypes(dst, abstractInst-{tyOpenArray}).kind == tyOpenArray:
return false
var dstSize, srcSize: BiggestInt
if skipTypes(src, abstractInst-{tyTypeDesc}).kind == tyTypeDesc:
return false
var dstSize, srcSize: BiggestInt
dstSize = computeSize(dst)
srcSize = computeSize(src)
if dstSize < 0: