Codetools: Revert the identifier completion change. Issue #32972.

This commit is contained in:
Juha 2025-03-03 20:23:54 +02:00
parent c42495ffab
commit 3db5d120a5

View File

@ -965,18 +965,14 @@ procedure TIdentifierList.Add(NewItem: TIdentifierListItem);
var
AnAVLNode: TAVLTreeNode;
begin
if (NewItem.GetDesc = ctnProcedure)
and ( (NewItem.IsFunction or NewItem.IsConstructor) // definition not finished yet
or (ilcfDontAllowProcedures in ContextFlags) ) // ???
then begin
Assert(NewItem.FResultType='', 'TIdentifierList.Add: FResultType is not empty');
if ilcfDontAllowProcedures in ContextFlags then
DebugLn('TIdentifierList.Add: ilcfDontAllowProcedures in ContextFlags, Desc = ctnProcedure');
if (ilcfDontAllowProcedures in ContextFlags) and (NewItem.GetDesc = ctnProcedure) and
not (NewItem.IsFunction or NewItem.IsConstructor)
then
begin
NewItem.Free;
Exit;
end;
if NewItem.FResultType<>'' then
DebugLn(['TIdentifierList.Add: ResultType=',NewItem.FResultType]);
AnAVLNode:=FIdentView.FindKey(NewItem,@CompareIdentListItemsForIdents);
if AnAVLNode=nil then begin
if History<>nil then