diff options
author | Araq <rumpf_a@web.de> | 2018-03-18 12:13:55 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-03-18 12:13:55 +0100 |
commit | 863c6260788f8ba1102845c338dc8f0ff283e3a0 (patch) | |
tree | c787edcbdd31387d41519376c23e5fd07275a9ea | |
parent | b0994c7f929395217b3caeb2699add29f35ff61e (diff) | |
download | Nim-863c6260788f8ba1102845c338dc8f0ff283e3a0.tar.gz |
fixes #7335
-rw-r--r-- | compiler/semcall.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/semcall.nim b/compiler/semcall.nim index ba38ed215..0fc12f164 100644 --- a/compiler/semcall.nim +++ b/compiler/semcall.nim @@ -190,12 +190,12 @@ proc presentFailedCandidates(c: PContext, n: PNode, errors: CandidateErrors): if wanted != nil and got != nil: effectProblem(wanted, got, candidates) if cond: candidates.add "\n" - elif err.unmatchedVarParam != 0 and err.unmatchedVarParam < n.len: - add(candidates, "for a 'var' type a variable needs to be passed, but '" & + if err.unmatchedVarParam != 0 and err.unmatchedVarParam < n.len: + candidates.add(" for a 'var' type a variable needs to be passed, but '" & renderNotLValue(n[err.unmatchedVarParam]) & "' is immutable\n") for diag in err.diagnostics: - add(candidates, diag & "\n") + candidates.add(diag & "\n") result = (prefer, candidates) |