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
parent a4f531c243
commit e54546bcff

View File

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