Fixes #1435
This commit is contained in:
parent
fd086abb43
commit
e46a735bb5
1 changed files with 2 additions and 0 deletions
|
|
@ -199,6 +199,8 @@ proc isCastable(dst, src: PType): bool =
|
||||||
result = (dstSize >= srcSize) or
|
result = (dstSize >= srcSize) or
|
||||||
(skipTypes(dst, abstractInst).kind in IntegralTypes) or
|
(skipTypes(dst, abstractInst).kind in IntegralTypes) or
|
||||||
(skipTypes(src, abstractInst-{tyTypeDesc}).kind in IntegralTypes)
|
(skipTypes(src, abstractInst-{tyTypeDesc}).kind in IntegralTypes)
|
||||||
|
if result and src.kind == tyNil:
|
||||||
|
result = dst.size <= platform.ptrSize
|
||||||
|
|
||||||
proc isSymChoice(n: PNode): bool {.inline.} =
|
proc isSymChoice(n: PNode): bool {.inline.} =
|
||||||
result = n.kind in nkSymChoices
|
result = n.kind in nkSymChoices
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue