summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semtypes.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim
index 304fe6d14..8c7bd7243 100644
--- a/compiler/semtypes.nim
+++ b/compiler/semtypes.nim
@@ -629,7 +629,7 @@ proc skipGenericInvocation(t: PType): PType {.inline.} =
   result = t
   if result.kind == tyGenericInvocation:
     result = result.sons[0]
-  if result.kind == tyGenericBody:
+  while result.kind in {tyGenericInst, tyGenericBody}:
     result = lastSon(result)
 
 proc addInheritedFields(c: PContext, check: var IntSet, pos: var int,