From 380933dc9ac7a743bde2616f50c9004e229f97b3 Mon Sep 17 00:00:00 2001 From: SirOlaf <.> Date: Sat, 16 Mar 2024 19:34:22 +0100 Subject: [PATCH] Use generic instance for markUsed --- compiler/semcall.nim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/semcall.nim b/compiler/semcall.nim index c3a2e77a71..a1892886a3 100644 --- a/compiler/semcall.nim +++ b/compiler/semcall.nim @@ -683,10 +683,10 @@ proc semResolvedCall(c: PContext, x: var TCandidate, assert x.state == csMatch var finalCallee = x.calleeSym let info = getCallLineInfo(n) - markUsed(c, info, finalCallee) - onUse(info, finalCallee) assert finalCallee.ast != nil if x.hasFauxMatch: + markUsed(c, info, finalCallee) + onUse(info, finalCallee) result = x.call result[0] = newSymNode(finalCallee, getCallLineInfo(result[0])) if containsGenericType(result.typ) or x.fauxMatch == tyUnknown: @@ -721,6 +721,8 @@ proc semResolvedCall(c: PContext, x: var TCandidate, x.call.add tn else: internalAssert c.config, false + markUsed(c, info, finalCallee) + onUse(info, finalCallee) result = x.call instGenericConvertersSons(c, result, x)