codetools: find declaration: result in nested proc

git-svn-id: trunk@48085 -
This commit is contained in:
mattias 2015-03-01 15:56:29 +00:00
parent b07fc833ca
commit 4a8bc5f9b6

View File

@ -7301,7 +7301,9 @@ var
// RESULT has a special meaning in a function
// -> check if in a function
if fdfExtractOperand in Params.Flags then Params.AddOperandPart('Result');
ProcNode:=StartNode.GetNodeOfType(ctnProcedure);
ProcNode:=StartNode;
while not NodeIsFunction(ProcNode) do
ProcNode:=ProcNode.Parent;
if (ProcNode<>nil) then begin
if IsEnd and (fdfFindVariable in StartFlags) then begin
BuildSubTreeForProcHead(ProcNode);