mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-06 11:26:00 +02:00
Codetools: Fix FindDeclaration tool to not finds inaccessible private/protected fields. Issue #22464, patch from Anton
git-svn-id: trunk@40909 -
This commit is contained in:
parent
3cad2a3828
commit
727f6ddd62
@ -8746,8 +8746,7 @@ begin
|
|||||||
Params.FoundProc^.ExprInputList.Count) then
|
Params.FoundProc^.ExprInputList.Count) then
|
||||||
begin
|
begin
|
||||||
// the new proc fits better
|
// the new proc fits better
|
||||||
Params.ChangeFoundProc(FoundContext,ParamCompatibility,
|
Params.ChangeFoundProc(FoundContext,ParamCompatibility,CurCompatibilityList);
|
||||||
CurCompatibilityList);
|
|
||||||
CurCompatibilityList:=nil; // set to nil, so that it will not be freed
|
CurCompatibilityList:=nil; // set to nil, so that it will not be freed
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -8758,6 +8757,14 @@ begin
|
|||||||
FreeMem(CurCompatibilityList);
|
FreeMem(CurCompatibilityList);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
end else
|
||||||
|
if (FoundContext.Node.Desc=ctnVarDefinition) then begin
|
||||||
|
if not (fdfIgnoreClassVisibility in Params.Flags)
|
||||||
|
and (FoundContext.Tool<>Params.IdentifierTool)
|
||||||
|
and (GetClassVisibility(FoundContext.Node)=ctnClassPrivate) then
|
||||||
|
Result:=ifrProceedSearch
|
||||||
|
else
|
||||||
|
Result:=ifrSuccess;
|
||||||
end else begin
|
end else begin
|
||||||
Result:=ifrSuccess;
|
Result:=ifrSuccess;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user