Fixes multiple bugs with sink arguments (#9802)
* fixes #9781 * fix spacing
This commit is contained in:
parent
410fd1deae
commit
2ac7f52388
4 changed files with 59 additions and 11 deletions
|
|
@ -237,9 +237,9 @@ proc computeSizeAlign(conf: ConfigRef; typ: PType) =
|
|||
# recursive tuplers are not allowed and should be detected in the frontend
|
||||
if base.kind == tyTuple:
|
||||
computeSizeAlign(conf, base)
|
||||
if base.size == szIllegalRecursion:
|
||||
typ.size = szIllegalRecursion
|
||||
typ.align = szIllegalRecursion
|
||||
if base.size < 0:
|
||||
typ.size = base.size
|
||||
typ.align = base.align
|
||||
return
|
||||
|
||||
typ.align = int16(conf.target.ptrSize)
|
||||
|
|
@ -379,7 +379,7 @@ proc computeSizeAlign(conf: ConfigRef; typ: PType) =
|
|||
typ.size = typ.lastSon.size
|
||||
typ.align = typ.lastSon.align
|
||||
|
||||
of tyGenericInst, tyDistinct, tyGenericBody, tyAlias:
|
||||
of tyGenericInst, tyDistinct, tyGenericBody, tyAlias, tySink:
|
||||
computeSizeAlign(conf, typ.lastSon)
|
||||
typ.size = typ.lastSon.size
|
||||
typ.align = typ.lastSon.align
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue