commit
94131e1e56
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue