Rename some variables in the isCastable code
This commit is contained in:
parent
c4f77ecd9a
commit
9d68fe3782
1 changed files with 6 additions and 6 deletions
|
|
@ -184,18 +184,18 @@ proc isCastable(dst, src: PType): bool =
|
|||
# castableTypeKinds = {tyInt, tyPtr, tyRef, tyCstring, tyString,
|
||||
# tySequence, tyPointer, tyNil, tyOpenArray,
|
||||
# tyProc, tySet, tyEnum, tyBool, tyChar}
|
||||
var ds, ss: BiggestInt
|
||||
var dstSize, srcSize: BiggestInt
|
||||
|
||||
ds = computeSize(dst)
|
||||
ss = computeSize(src)
|
||||
if ds < 0:
|
||||
dstSize = computeSize(dst)
|
||||
srcSize = computeSize(src)
|
||||
if dstSize < 0:
|
||||
result = false
|
||||
elif ss < 0:
|
||||
elif srcSize < 0:
|
||||
result = false
|
||||
elif not typeAllowed(dst, skParam):
|
||||
result = false
|
||||
else:
|
||||
result = (ds >= ss) or
|
||||
result = (dstSize >= srcSize) or
|
||||
(skipTypes(dst, abstractInst).kind in IntegralTypes) or
|
||||
(skipTypes(src, abstractInst-{tyTypeDesc}).kind in IntegralTypes)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue