summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorJulian Fondren <julian.fondren@gmail.com>2019-04-28 01:40:42 -0500
committerJulian Fondren <julian.fondren@gmail.com>2019-04-28 01:40:42 -0500
commit86b7de224a0f250ee05f49ec6b5b675a0de82f69 (patch)
tree2fdd55762d3b0a88c3ed1c1f7ce9b019ebf2d8ad /compiler
parent5bdab044f5c252b3e97595f87861adc58238352a (diff)
downloadNim-86b7de224a0f250ee05f49ec6b5b675a0de82f69.tar.gz
provide more useful ambiguous-identifier error output
Diffstat (limited to 'compiler')
-rw-r--r--compiler/lookups.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/lookups.nim b/compiler/lookups.nim
index 8bc263485..926458080 100644
--- a/compiler/lookups.nim
+++ b/compiler/lookups.nim
@@ -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)