fix when statements in inheritable generic objects (#13667) [backport]
This commit is contained in:
parent
122751aa52
commit
51bd442b88
2 changed files with 12 additions and 1 deletions
|
|
@ -804,7 +804,7 @@ proc addInheritedFieldsAux(c: PContext, check: var IntSet, pos: var int,
|
|||
addInheritedFieldsAux(c, check, pos, lastSon(n[i]))
|
||||
else: internalError(c.config, n.info, "addInheritedFieldsAux(record case branch)")
|
||||
of nkRecList, nkRecWhen, nkElifBranch, nkElse:
|
||||
for i in 0..<n.len:
|
||||
for i in int(n.kind == nkElifBranch)..<n.len:
|
||||
addInheritedFieldsAux(c, check, pos, n[i])
|
||||
of nkSym:
|
||||
incl(check, n.sym.name.id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue