mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 19:59:14 +02:00
codetools: fixed uninitialized result
git-svn-id: trunk@37022 -
This commit is contained in:
parent
d0e93df910
commit
b47c4e7481
@ -812,8 +812,9 @@ var
|
||||
function ProtectedNodeIsInAllowedClass: boolean;
|
||||
var
|
||||
CurClassNode: TCodeTreeNode;
|
||||
p: TFindContext;
|
||||
FoundClassContext: TFindContext;
|
||||
begin
|
||||
Result:=false;
|
||||
if FICTClassAndAncestors<>nil then begin
|
||||
// start of the identifier completion is in a method or class
|
||||
// => all protected ancestor classes are allowed as well.
|
||||
@ -822,16 +823,14 @@ var
|
||||
and (not (CurClassNode.Desc in AllClasses)) do
|
||||
CurClassNode:=CurClassNode.Parent;
|
||||
if CurClassNode=nil then exit;
|
||||
p:=CreateFindContext(Params.NewCodeTool,CurClassNode);
|
||||
if IndexOfFindContext(FICTClassAndAncestors,@p)>=0 then begin
|
||||
FoundClassContext:=CreateFindContext(Params.NewCodeTool,CurClassNode);
|
||||
if IndexOfFindContext(FICTClassAndAncestors,@FoundClassContext)>=0 then begin
|
||||
// this class node is the class or one of the ancestors of the class
|
||||
// of the start context of the identifier completion
|
||||
exit(true);
|
||||
end;
|
||||
end;
|
||||
//DebugLn(['ProtectedNodeIsInAllowedClass hidden: ',FindContextToString(FoundContext)]);
|
||||
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
function PropertyIsOverridenPublicPublish: boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user