diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 1bf4e13a305ba..a96a9abbc436a 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -239,7 +239,8 @@ proc sumGeneric(t: PType): int = result += sumGeneric(a) break of tyProc: - result += sumGeneric(t.returnType) + if t.returnType != nil: + result += sumGeneric(t.returnType) for _, a in t.paramTypes: result += sumGeneric(a) break