diff --git a/compiler/semcall.nim b/compiler/semcall.nim index b83872fe9..19c3f0bf9 100644 --- a/compiler/semcall.nim +++ b/compiler/semcall.nim @@ -444,3 +444,6 @@ proc searchForBorrowProc(c: PContext, startScope: PScope, fn: PSym): PSym = var resolved = semOverloadedCall(c, call, call, {fn.kind}) if resolved != nil: result = resolved.sons[0].sym + if not compareTypes(result.typ.sons[0], fn.typ.sons[0], dcEqIgnoreDistinct): + result = nil +