trivial crash caused due to unchecked iteration over an empty reclist
This commit is contained in:
Zahary Karadjov 2014-03-10 13:04:22 +02:00
commit 85fe5e1940
2 changed files with 6 additions and 6 deletions

View file

@ -320,9 +320,8 @@ proc propagateFieldFlags(t: PType, n: PNode) =
of nkSym:
propagateToOwner(t, n.sym.typ)
of nkRecList, nkRecCase, nkOfBranch, nkElse:
if n.sons != nil:
for son in n.sons:
propagateFieldFlags(t, son)
for son in n:
propagateFieldFlags(t, son)
else: discard
proc replaceTypeVarsTAux(cl: var TReplTypeVars, t: PType): PType =