diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2014-10-02 00:38:27 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2014-10-02 00:38:27 +0200 |
commit | 2154906fc9b02aa660caec738ebc11529e89bfad (patch) | |
tree | 9bc60a0e65cc9924267fd5168f58df447e5b3250 | |
parent | 93d55c077ffc9b9df381b4f921a16960c7141f19 (diff) | |
parent | 55c78af9c0a7a63683ee49044ece0667f699adc8 (diff) | |
download | Nim-2154906fc9b02aa660caec738ebc11529e89bfad.tar.gz |
Merge pull request #1549 from Varriount/fix-1529
Fixes #1529
-rw-r--r-- | compiler/procfind.nim | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/compiler/procfind.nim b/compiler/procfind.nim index 0354d585d..9f52cc117 100644 --- a/compiler/procfind.nim +++ b/compiler/procfind.nim @@ -70,8 +70,15 @@ proc searchForProcNew(c: PContext, scope: PScope, fn: PSym): PSym = var it: TIdentIter result = initIdentIter(it, scope.symbols, fn.name) while result != nil: - if result.kind in skProcKinds and - sameType(result.typ, fn.typ, flags): return + if result.kind in skProcKinds and sameType(result.typ, fn.typ, flags): + case equalParams(result.typ.n, fn.typ.n) + of paramsEqual: + return + of paramsIncompatible: + localError(fn.info, errNotOverloadable, fn.name.s) + return + of paramsNotEqual: + discard result = nextIdentIter(it, scope.symbols) |