From ee984f8836740cb64d88c622ff652e396751edee Mon Sep 17 00:00:00 2001 From: metagn Date: Wed, 24 Jan 2024 00:00:34 +0300 Subject: account for nil return type in tyProc sumGeneric (#23250) fixes #23249 --- compiler/sigmatch.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/sigmatch.nim') diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index b4d875981..a0de33ed5 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -246,7 +246,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 -- cgit 1.4.1-2-gfad0