diff options
author | Jasper Jenkins <jasper.vs.jenkins@gmail.com> | 2020-03-17 15:44:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-17 23:44:32 +0100 |
commit | 51bd442b88de561ea4729c0ba550e63cad5be969 (patch) | |
tree | 67f4b8df2a394e46dd283ef0a9a6f3845fc0811c /compiler | |
parent | 122751aa526e3b839fbc717f8c7cd9256a134dd1 (diff) | |
download | Nim-51bd442b88de561ea4729c0ba550e63cad5be969.tar.gz |
fix when statements in inheritable generic objects (#13667) [backport]
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semtypes.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index 3951c071f..867106b87 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -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) |