Codetools: Improvement for FindContext for hidden methods. Part of issue #18929, patch from Anton

git-svn-id: trunk@41085 -
This commit is contained in:
juha 2013-05-09 08:56:19 +00:00
parent 0ce3f9f9f0
commit 712a0979f0

View File

@ -719,7 +719,13 @@ var
begin
FIdentSearchItem.Identifier:=Identifier;
// ignore ParamList (for checking function overloading)
AVLNode:=FIdentView.FindKey(FIdentSearchItem,@CompareIdentListSearchWithItemsWithoutParams);
AVLNode:=FIdentView.FindLeftMostKey(FIdentSearchItem,
@CompareIdentListSearchWithItemsWithoutParams);
while (AVLNode<>nil)
and not (TIdentifierListItem(AVLNode.Data).Node.Desc in [ctnProcedure,ctnProcedureHead])
and (CompareIdentifiers(Identifier,PChar(TIdentifierListItem(AVLNode.Data).Identifier))=0)
do
AVLNode:=FIdentView.FindSuccessor(AVLNode);
if AVLNode<>nil then
Result:=TIdentifierListItem(AVLNode.Data)
else