|
@@ -511,6 +511,7 @@ implementation
|
|
|
hclass : tobjectdef;
|
|
|
hashedid : THashedIDString;
|
|
|
srsym : tsym;
|
|
|
+ overload: boolean;
|
|
|
begin
|
|
|
result:=nil;
|
|
|
hashedid.id:=name;
|
|
@@ -523,9 +524,12 @@ implementation
|
|
|
((hclass=_class) or
|
|
|
is_visible_for_object(srsym,_class)) then
|
|
|
begin
|
|
|
+ overload:=false;
|
|
|
for i:=0 to Tprocsym(srsym).ProcdefList.Count-1 do
|
|
|
begin
|
|
|
implprocdef:=tprocdef(tprocsym(srsym).ProcdefList[i]);
|
|
|
+ if po_overload in implprocdef.procoptions then
|
|
|
+ overload:=true;
|
|
|
if (implprocdef.procsym=tprocsym(srsym)) and
|
|
|
(compare_paras(proc.paras,implprocdef.paras,cp_all,[cpo_ignorehidden,cpo_ignoreuniv])>=te_equal) and
|
|
|
(compare_defs(proc.returndef,implprocdef.returndef,nothingn)>=te_equal) and
|
|
@@ -546,6 +550,10 @@ implementation
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
+ { like with normal procdef resolution (in htypechk), stop if
|
|
|
+ we encounter a proc without the overload directive }
|
|
|
+ if not overload then
|
|
|
+ exit;
|
|
|
end;
|
|
|
hclass:=hclass.childof;
|
|
|
end;
|