* fix #13538 sigmatch now sorted and has reliable order * re-enable tests that were disabled because of that bug * fix remaining tests and un-disable 2 other tests that were affected by this bug
This commit is contained in:
parent
55d3780b7b
commit
dd362ab4c0
6 changed files with 58 additions and 51 deletions
|
|
@ -10,6 +10,8 @@
|
|||
## This module implements semantic checking for calls.
|
||||
# included from sem.nim
|
||||
|
||||
from algorithm import sort
|
||||
|
||||
proc sameMethodDispatcher(a, b: PSym): bool =
|
||||
result = false
|
||||
if a.kind == skMethod and b.kind == skMethod:
|
||||
|
|
@ -178,9 +180,11 @@ proc presentFailedCandidates(c: PContext, n: PNode, errors: CandidateErrors):
|
|||
|
||||
var maybeWrongSpace = false
|
||||
|
||||
var candidatesAll: seq[string]
|
||||
var candidates = ""
|
||||
var skipped = 0
|
||||
for err in errors:
|
||||
candidates.setLen 0
|
||||
if filterOnlyFirst and err.firstMismatch.arg == 1:
|
||||
inc skipped
|
||||
continue
|
||||
|
|
@ -225,6 +229,9 @@ proc presentFailedCandidates(c: PContext, n: PNode, errors: CandidateErrors):
|
|||
maybeWrongSpace = true
|
||||
for diag in err.diagnostics:
|
||||
candidates.add(diag & "\n")
|
||||
candidatesAll.add candidates
|
||||
candidatesAll.sort # fix #13538
|
||||
candidates = join(candidatesAll)
|
||||
if skipped > 0:
|
||||
candidates.add($skipped & " other mismatching symbols have been " &
|
||||
"suppressed; compile with --showAllMismatches:on to see them\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue