diff options
author | Araq <rumpf_a@web.de> | 2018-08-27 17:07:05 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-08-27 17:07:12 +0200 |
commit | 7bb93c730ea87fd2437dea1d93e889fb4a2c08f4 (patch) | |
tree | 5b4439f6a292b27e166aa2040f4995b935132345 /compiler | |
parent | a60cf221e8c116f9b212b69ad52e594ec43bffe4 (diff) | |
download | Nim-7bb93c730ea87fd2437dea1d93e889fb4a2c08f4.tar.gz |
show all mismatching overloads again
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semcall.nim | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/compiler/semcall.nim b/compiler/semcall.nim index 00b591632..9e75f8cd4 100644 --- a/compiler/semcall.nim +++ b/compiler/semcall.nim @@ -166,18 +166,20 @@ proc presentFailedCandidates(c: PContext, n: PNode, errors: CandidateErrors): prefer = preferModuleInfo break - # we pretend procs are attached to the type of the first - # argument in order to remove plenty of candidates. This is - # comparable to what C# does and C# is doing fine. - var filterOnlyFirst = false - for err in errors: - if err.firstMismatch > 1: - filterOnlyFirst = true - break + when false: + # we pretend procs are attached to the type of the first + # argument in order to remove plenty of candidates. This is + # comparable to what C# does and C# is doing fine. + var filterOnlyFirst = false + for err in errors: + if err.firstMismatch > 1: + filterOnlyFirst = true + break var candidates = "" for err in errors: - if filterOnlyFirst and err.firstMismatch == 1: continue + when false: + if filterOnlyFirst and err.firstMismatch == 1: continue if err.sym.kind in routineKinds and err.sym.ast != nil: add(candidates, renderTree(err.sym.ast, {renderNoBody, renderNoComments, renderNoPragmas})) |