From da8f6e16cc2107db029a240e5c4d3f02ba707ba8 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 26 Aug 2016 15:19:32 +0200 Subject: [PATCH] fixes #4491 --- compiler/semcall.nim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/semcall.nim b/compiler/semcall.nim index 19c3f0bf9..b3fc020b1 100644 --- a/compiler/semcall.nim +++ b/compiler/semcall.nim @@ -446,4 +446,7 @@ proc searchForBorrowProc(c: PContext, startScope: PScope, fn: PSym): PSym = result = resolved.sons[0].sym if not compareTypes(result.typ.sons[0], fn.typ.sons[0], dcEqIgnoreDistinct): result = nil + elif result.magic in {mArrPut, mArrGet}: + # cannot borrow these magics for now + result = nil