recursive tuple types are now invalid (breaking change)
This commit is contained in:
parent
279e897eab
commit
595cc93762
5 changed files with 51 additions and 42 deletions
|
|
@ -1209,7 +1209,9 @@ proc computeSizeAux(typ: PType, a: var BiggestInt): BiggestInt =
|
|||
a = ptrSize
|
||||
of tyNil, tyCString, tyString, tySequence, tyPtr, tyRef, tyVar, tyOpenArray,
|
||||
tyBigNum:
|
||||
if typ.lastSon == typ: result = szIllegalRecursion
|
||||
let base = typ.lastSon
|
||||
if base == typ or (base.kind == tyTuple and base.size==szIllegalRecursion):
|
||||
result = szIllegalRecursion
|
||||
else: result = ptrSize
|
||||
a = result
|
||||
of tyArray, tyArrayConstr:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue