diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-05-08 17:54:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-08 17:54:53 +0200 |
commit | 99ae9113919149f14d95d2ca9f3e8ada992152cd (patch) | |
tree | 178a8e399b8debe6dc0f7b43c92ed35e3cec10be /compiler | |
parent | cd79c6f5323f70a1f3783cd8f0f17f47ed523fed (diff) | |
parent | 8cadeb960597a47a09100bdda05672f177d158d2 (diff) | |
download | Nim-99ae9113919149f14d95d2ca9f3e8ada992152cd.tar.gz |
Merge pull request #11132 from jrfondren/expand-amb-identifier-output
provide more useful ambiguous-identifier error output
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/lookups.nim | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/lookups.nim b/compiler/lookups.nim index a8908b1f6..7c37817fd 100644 --- a/compiler/lookups.nim +++ b/compiler/lookups.nim @@ -255,9 +255,10 @@ 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 " " & candidate.owner.name.s & "." & candidate.name.s + err.add ": " & typeToString(candidate.typ) candidate = nextIdentIter(ti, c.importTable.symbols) inc i localError(c.config, info, errGenerated, err) |