commit
2154906fc9
1 changed files with 9 additions and 2 deletions
|
|
@ -70,8 +70,15 @@ proc searchForProcNew(c: PContext, scope: PScope, fn: PSym): PSym =
|
||||||
var it: TIdentIter
|
var it: TIdentIter
|
||||||
result = initIdentIter(it, scope.symbols, fn.name)
|
result = initIdentIter(it, scope.symbols, fn.name)
|
||||||
while result != nil:
|
while result != nil:
|
||||||
if result.kind in skProcKinds and
|
if result.kind in skProcKinds and sameType(result.typ, fn.typ, flags):
|
||||||
sameType(result.typ, fn.typ, flags): return
|
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)
|
result = nextIdentIter(it, scope.symbols)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue