From a400e8f7f39b1bb29245323c6d999f01b46f22c3 Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 3 Feb 2015 13:19:33 +0100 Subject: better error message for auto-deref --- compiler/semcall.nim | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler') diff --git a/compiler/semcall.nim b/compiler/semcall.nim index cdfdfc9d0..5cb713030 100644 --- a/compiler/semcall.nim +++ b/compiler/semcall.nim @@ -315,6 +315,8 @@ proc semOverloadedCall(c: PContext, n, nOrig: PNode, var r = resolveOverloads(c, n, nOrig, filter, errors) if r.state == csMatch: result = semResolvedCall(c, n, r) else: + # get rid of the deref again for a better error message: + n.sons[1] = n.sons[1].sons[0] notFoundError(c, n, errors) else: notFoundError(c, n, errors) -- cgit 1.4.1-2-gfad0