mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 21:41:35 +02:00
implemented find declaration for Self in nested procs
git-svn-id: trunk@4984 -
This commit is contained in:
parent
079fcb7fbb
commit
ec76009548
@ -3953,8 +3953,13 @@ var
|
||||
and (ExprType.Context.Node.Desc in AllPascalStatements) then begin
|
||||
if CompareSrcIdentifier(CurAtom.StartPos,'SELF') then begin
|
||||
// SELF in a method is the object itself
|
||||
// -> check if in a proc
|
||||
ProcNode:=ExprType.Context.Node.GetNodeOfType(ctnProcedure);
|
||||
// -> check if in a method or nested proc of a method
|
||||
ProcNode:=ExprType.Context.Node;
|
||||
while (ProcNode<>nil) do begin
|
||||
if (ProcNode.Desc=ctnProcedure) and NodeIsMethodBody(ProcNode) then
|
||||
break;
|
||||
ProcNode:=ProcNode.Parent;
|
||||
end;
|
||||
if (ProcNode<>nil)
|
||||
and ExprType.Context.Tool.FindClassOfMethod(ProcNode,Params,
|
||||
not IsIdentifierEndOfVariable)
|
||||
|
Loading…
Reference in New Issue
Block a user