summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/semcall.nim2
1 files changed, 2 insertions, 0 deletions
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)