From cc438a89a513de42dfcfdb38016cbe55d7fcfb17 Mon Sep 17 00:00:00 2001 From: metagn <10591326+metagn@users.noreply.github.com> Date: Sun, 7 Jan 2024 00:08:52 +0300 Subject: [PATCH] fix match count --- compiler/sigmatch.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index ad472d57bf85..e92669762dc6 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -2172,10 +2172,11 @@ proc paramTypesMatchAux(m: var TCandidate, f, a: PType, m.calleeSym.kind in {skMacro, skTemplate}: # XXX: duplicating this is ugly, but we cannot (!) move this # directly into typeRel using return-like templates - incMatches(m, r) if f.kind in {tyTyped, tyUntyped, tyTypeDesc}: + incMatches(m, r) return arg elif f.kind == tyStatic and arg.typ.n != nil: + incMatches(m, r) return arg.typ.n # If r == isBothMetaConvertible then we rerun typeRel.