fixes #7335
This commit is contained in:
parent
b0994c7f92
commit
863c626078
1 changed files with 3 additions and 3 deletions
|
|
@ -190,12 +190,12 @@ proc presentFailedCandidates(c: PContext, n: PNode, errors: CandidateErrors):
|
||||||
if wanted != nil and got != nil:
|
if wanted != nil and got != nil:
|
||||||
effectProblem(wanted, got, candidates)
|
effectProblem(wanted, got, candidates)
|
||||||
if cond: candidates.add "\n"
|
if cond: candidates.add "\n"
|
||||||
elif err.unmatchedVarParam != 0 and err.unmatchedVarParam < n.len:
|
if err.unmatchedVarParam != 0 and err.unmatchedVarParam < n.len:
|
||||||
add(candidates, "for a 'var' type a variable needs to be passed, but '" &
|
candidates.add(" for a 'var' type a variable needs to be passed, but '" &
|
||||||
renderNotLValue(n[err.unmatchedVarParam]) &
|
renderNotLValue(n[err.unmatchedVarParam]) &
|
||||||
"' is immutable\n")
|
"' is immutable\n")
|
||||||
for diag in err.diagnostics:
|
for diag in err.diagnostics:
|
||||||
add(candidates, diag & "\n")
|
candidates.add(diag & "\n")
|
||||||
|
|
||||||
result = (prefer, candidates)
|
result = (prefer, candidates)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue