fixes #7569, all credit to @vincentvidal (#11213)

This commit is contained in:
Miran 2019-05-10 08:48:12 +02:00 • committed by Andreas Rumpf
commit e54546bcff

View file

@ -738,7 +738,7 @@ proc addInheritedFieldsAux(c: PContext, check: var IntSet, pos: var int,
of nkOfBranch, nkElse: of nkOfBranch, nkElse:
addInheritedFieldsAux(c, check, pos, lastSon(n.sons[i])) addInheritedFieldsAux(c, check, pos, lastSon(n.sons[i]))
else: internalError(c.config, n.info, "addInheritedFieldsAux(record case branch)") else: internalError(c.config, n.info, "addInheritedFieldsAux(record case branch)")
of nkRecList: of nkRecList, nkRecWhen, nkElifBranch, nkElse:
for i in 0 ..< sonsLen(n): for i in 0 ..< sonsLen(n):
addInheritedFieldsAux(c, check, pos, n.sons[i]) addInheritedFieldsAux(c, check, pos, n.sons[i])
of nkSym: of nkSym: