parent
0eaacbc2c4
commit
0a49fe5fad
2 changed files with 10 additions and 1 deletions
|
|
@ -1329,8 +1329,10 @@ proc typeSectionFinalPass(c: PContext, n: PNode) =
|
|||
else:
|
||||
while x.kind in {nkStmtList, nkStmtListExpr} and x.len > 0:
|
||||
x = x.lastSon
|
||||
# we need the 'safeSkipTypes' here because illegally recursive types
|
||||
# can enter at this point, see bug #13763
|
||||
if x.kind notin {nkObjectTy, nkDistinctTy, nkEnumTy, nkEmpty} and
|
||||
s.typ.skipTypes(abstractPtrs-{tyAlias}).kind notin {tyObject, tyEnum}:
|
||||
s.typ.safeSkipTypes(abstractPtrs).kind notin {tyObject, tyEnum}:
|
||||
# type aliases are hard:
|
||||
var t = semTypeNode(c, x, nil)
|
||||
assert t != nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue