diff options
-rw-r--r-- | compiler/lookups.nim | 7 | ||||
-rw-r--r-- | tests/modules/tambig_range.nim | 4 |
2 files changed, 6 insertions, 5 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) diff --git a/tests/modules/tambig_range.nim b/tests/modules/tambig_range.nim index 8fe488b59..e1ecc0013 100644 --- a/tests/modules/tambig_range.nim +++ b/tests/modules/tambig_range.nim @@ -1,6 +1,6 @@ discard """ - errormsg: "ambiguous identifier: 'range' -- use system.range or mrange.range" - line: 13 + errormsg: "ambiguous identifier: 'range' -- use one of the following:" + line: "13" """ import mrange |