parent
114da04cbb
commit
00d46ca1c0
1 changed files with 8 additions and 0 deletions
|
|
@ -176,6 +176,8 @@ proc presentFailedCandidates(c: PContext, n: PNode, errors: CandidateErrors):
|
||||||
filterOnlyFirst = true
|
filterOnlyFirst = true
|
||||||
break
|
break
|
||||||
|
|
||||||
|
var maybeWrongSpace = false
|
||||||
|
|
||||||
var candidates = ""
|
var candidates = ""
|
||||||
var skipped = 0
|
var skipped = 0
|
||||||
for err in errors:
|
for err in errors:
|
||||||
|
|
@ -218,11 +220,17 @@ proc presentFailedCandidates(c: PContext, n: PNode, errors: CandidateErrors):
|
||||||
if got != nil: effectProblem(wanted, got, candidates)
|
if got != nil: effectProblem(wanted, got, candidates)
|
||||||
of kUnknown: discard "do not break 'nim check'"
|
of kUnknown: discard "do not break 'nim check'"
|
||||||
candidates.add "\n"
|
candidates.add "\n"
|
||||||
|
if err.firstMismatch.arg == 1 and nArg.kind == nkTupleConstr and
|
||||||
|
n.kind == nkCommand:
|
||||||
|
maybeWrongSpace = true
|
||||||
for diag in err.diagnostics:
|
for diag in err.diagnostics:
|
||||||
candidates.add(diag & "\n")
|
candidates.add(diag & "\n")
|
||||||
if skipped > 0:
|
if skipped > 0:
|
||||||
candidates.add($skipped & " other mismatching symbols have been " &
|
candidates.add($skipped & " other mismatching symbols have been " &
|
||||||
"suppressed; compile with --showAllMismatches:on to see them\n")
|
"suppressed; compile with --showAllMismatches:on to see them\n")
|
||||||
|
if maybeWrongSpace:
|
||||||
|
candidates.add("maybe misplaced space between " & renderTree(n[0]) & " and '(' \n")
|
||||||
|
|
||||||
result = (prefer, candidates)
|
result = (prefer, candidates)
|
||||||
|
|
||||||
const
|
const
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue