provide more useful ambiguous-identifier error output
This commit is contained in:
parent
5bdab044f5
commit
86b7de224a
1 changed files with 3 additions and 3 deletions
|
|
@ -255,9 +255,9 @@ proc errorUseQualifier*(c: PContext; info: TLineInfo; s: PSym) =
|
|||
var candidate = initIdentIter(ti, c.importTable.symbols, s.name)
|
||||
var i = 0
|
||||
while candidate != nil:
|
||||
if i == 0: err.add " --use "
|
||||
else: err.add " or "
|
||||
err.add candidate.owner.name.s & "." & candidate.name.s
|
||||
if i == 0: err.add " --use one of the following:\n"
|
||||
else: err.add "\n"
|
||||
err.add typeToString(candidate.typ)
|
||||
candidate = nextIdentIter(ti, c.importTable.symbols)
|
||||
inc i
|
||||
localError(c.config, info, errGenerated, err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue