From 0e3c87e83dd5cc7f44bc21da349d7032470161a5 Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 11 Mar 2022 16:42:17 +0100 Subject: [PATCH] Codetools: Fix setting "SubParams.Flags" in SearchIdentifier nested in TFindDeclarationTool.FindBaseTypeOfNode. - "SubParams.Flags" originally copied flags from the outer search (masked with fdfGlobals). - Before fa76ed282caa5597742d03c55f5b33f6ff082961 "SubParams" was named"Params" - In 2cbc2f4f5a712ddcf90c382e73ab6ff375508746 the code was refactored into a subroutine. "Params" became a new local var (with a newly created instance). So "... +(fdfGlobals*Params.Flags);" no longer copied the existing flags. --- components/codetools/finddeclarationtool.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/codetools/finddeclarationtool.pas b/components/codetools/finddeclarationtool.pas index 008de2ce40..b0f6a0b4cd 100644 --- a/components/codetools/finddeclarationtool.pas +++ b/components/codetools/finddeclarationtool.pas @@ -5268,7 +5268,7 @@ var debugln(['TFindDeclarationTool.FindBaseTypeOfNode.SearchIdentifier Identifier=',GetIdentifier(@Src[IdentStart])]); {$ENDIF} SubParams.Flags:=[fdfSearchInParentNodes,fdfExceptionOnNotFound] - +(fdfGlobals*SubParams.Flags); + +(fdfGlobals*Params.Flags); SubParams.ContextNode:=StartNode.Parent; if (SubParams.ContextNode.Desc in (AllIdentifierDefinitions)) then begin