diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index ede1c819e4..1a4bd24965 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -2049,6 +2049,7 @@ proc semTypeIdent(c: PContext, n: PNode): PSym = # proc signature for example if c.inGenericInst > 0: let bound = result.typ.elementType.sym + # the symbol may still point to the uninstantiated generic body type if bound != nil and bound.typ == result.typ.elementType: return bound return result