Size ptr tuple (#10846)
* fixes #10117 * Add support for recursive tuples * detect in generics
This commit is contained in:
parent
5661a8303c
commit
97c3b113a5
8 changed files with 153 additions and 10 deletions
|
|
@ -272,14 +272,6 @@ proc computeSizeAlign(conf: ConfigRef; typ: PType) =
|
|||
typ.align = szIllegalRecursion
|
||||
return
|
||||
|
||||
# recursive tuplers are not allowed and should be detected in the frontend
|
||||
if base.kind == tyTuple:
|
||||
computeSizeAlign(conf, base)
|
||||
if base.size < 0:
|
||||
typ.size = base.size
|
||||
typ.align = base.align
|
||||
return
|
||||
|
||||
typ.align = int16(conf.target.ptrSize)
|
||||
if typ.kind == tySequence and conf.selectedGC == gcDestructors:
|
||||
typ.size = conf.target.ptrSize * 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue