Merge branch 'devel' of https://github.com/Araq/Nimrod into devel

This commit is contained in:
Araq 2014-08-11 20:38:36 +02:00
commit aaf4b04203
6 changed files with 353 additions and 310 deletions

View file

@ -185,13 +185,15 @@ proc isCastable(dst, src: PType): bool =
# castableTypeKinds = {tyInt, tyPtr, tyRef, tyCstring, tyString,
# tySequence, tyPointer, tyNil, tyOpenArray,
# tyProc, tySet, tyEnum, tyBool, tyChar}
if skipTypes(dst, abstractInst-{tyOpenArray}).kind == tyOpenArray:
return false
var dstSize, srcSize: BiggestInt
dstSize = computeSize(dst)
srcSize = computeSize(src)
if dstSize < 0:
result = false
elif srcSize < 0:
elif srcSize < 0:
result = false
elif not typeAllowed(dst, skParam):
result = false