From d3888577e9f0802abfcc92b9b7bda8b7f45996ed Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 26 Aug 2016 15:15:18 +0200 Subject: [PATCH] fixes #3928 --- compiler/semcall.nim | 3 +++ 1 file changed, 3 insertions(+) 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 +