summary refs log tree commit diff stats
path: root/compiler/sigmatch.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-09-03 16:07:35 +0200
committerAraq <rumpf_a@web.de>2018-09-03 16:07:44 +0200
commit0694c9080f85b59e86ddfb0bd3c799fe9d9e30ae (patch)
treeb150f0a27b07303b8394360258b3d9023ddf2983 /compiler/sigmatch.nim
parente63c66b8104225cefe0413471410ef4c072f9954 (diff)
downloadNim-0694c9080f85b59e86ddfb0bd3c799fe9d9e30ae.tar.gz
fixes #8043
Diffstat (limited to 'compiler/sigmatch.nim')
-rw-r--r--compiler/sigmatch.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index e59496cca..407e34619 100644
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -2252,11 +2252,13 @@ proc matchesAux(c: PContext, n, nOrig: PNode,
       if n.sons[a].sons[0].kind != nkIdent:
         localError(c.config, n.sons[a].info, "named parameter has to be an identifier")
         m.state = csNoMatch
+        m.firstMismatch = -a
         return
       formal = getSymFromList(m.callee.n, n.sons[a].sons[0].ident, 1)
       if formal == nil:
         # no error message!
         m.state = csNoMatch
+        m.firstMismatch = -a
         return
       if containsOrIncl(marker, formal.position):
         # already in namedParams, so no match
@@ -2274,6 +2276,7 @@ proc matchesAux(c: PContext, n, nOrig: PNode,
                                 n.sons[a].sons[1], n.sons[a].sons[1])
       if arg == nil:
         m.state = csNoMatch
+        m.firstMismatch = a
         return
       checkConstraint(n.sons[a].sons[1])
       if m.baseTypeMatch: