diff options
author | Clay Sweetser <clay.sweetser@gmail.com> | 2014-10-01 18:14:06 -0400 |
---|---|---|
committer | Clay Sweetser <clay.sweetser@gmail.com> | 2014-10-01 18:14:06 -0400 |
commit | 55c78af9c0a7a63683ee49044ece0667f699adc8 (patch) | |
tree | 9bc60a0e65cc9924267fd5168f58df447e5b3250 /compiler | |
parent | 93d55c077ffc9b9df381b4f921a16960c7141f19 (diff) | |
download | Nim-55c78af9c0a7a63683ee49044ece0667f699adc8.tar.gz |
Fixes #1529
Diffstat (limited to 'compiler')
-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) |