From 51bd442b88de561ea4729c0ba550e63cad5be969 Mon Sep 17 00:00:00 2001 From: Jasper Jenkins Date: Tue, 17 Mar 2020 15:44:32 -0700 Subject: [PATCH] fix when statements in inheritable generic objects (#13667) [backport] --- compiler/semtypes.nim | 2 +- tests/objects/tobject3.nim | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) 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..