From 9c6de08db074dfd41ef4671f99086c1b53a8b540 Mon Sep 17 00:00:00 2001 From: Araq Date: Sat, 31 Aug 2013 16:45:10 +0200 Subject: [PATCH] fixes #516 --- compiler/semcall.nim | 9 ++++++--- tests/reject/tinvalidborrow.nim | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 tests/reject/tinvalidborrow.nim diff --git a/compiler/semcall.nim b/compiler/semcall.nim index 735e6fac8e..a29efcd8ac 100644 --- a/compiler/semcall.nim +++ b/compiler/semcall.nim @@ -207,11 +207,14 @@ proc SearchForBorrowProc(c: PContext, startScope: PScope, fn: PSym): PSym = # New approach: generate fn(x, y, z) where x, y, z have the proper types # and use the overloading resolution mechanism: var call = newNode(nkCall) + var hasDistinct = false call.add(newIdentNode(fn.name, fn.info)) for i in 1..