diff --git a/components/codetools/finddeclarationtool.pas b/components/codetools/finddeclarationtool.pas index b0f6a0b4cd..9248d0a77b 100644 --- a/components/codetools/finddeclarationtool.pas +++ b/components/codetools/finddeclarationtool.pas @@ -194,6 +194,7 @@ const fdfGlobals = [fdfExceptionOnNotFound, fdfTopLvlResolving, fdfExtractOperand, fdfPropertyResolving, fdfOverrideStringTypesWithFirstParamType]; + fdfGlobalsAndAncestor = fdfGlobals+[fdfSearchInAncestors]; fdfGlobalsSameIdent = fdfGlobals+[fdfExceptionOnPredefinedIdent, fdfIgnoreMissingParams, fdfIgnoreUsedUnits, fdfDoNotCache, fdfOnlyCompatibleProc, fdfSearchInAncestors, fdfCollect, fdfSearchInHelpers]; @@ -5268,7 +5269,7 @@ var debugln(['TFindDeclarationTool.FindBaseTypeOfNode.SearchIdentifier Identifier=',GetIdentifier(@Src[IdentStart])]); {$ENDIF} SubParams.Flags:=[fdfSearchInParentNodes,fdfExceptionOnNotFound] - +(fdfGlobals*Params.Flags); + +(fdfGlobalsAndAncestor*Params.Flags); SubParams.ContextNode:=StartNode.Parent; if (SubParams.ContextNode.Desc in (AllIdentifierDefinitions)) then begin diff --git a/components/codetools/tests/moduletests/fdt_nestedaliasclass.pas b/components/codetools/tests/moduletests/fdt_nestedaliasclass.pas index 15dc06bb42..f17e4fa6cb 100644 --- a/components/codetools/tests/moduletests/fdt_nestedaliasclass.pas +++ b/components/codetools/tests/moduletests/fdt_nestedaliasclass.pas @@ -25,7 +25,7 @@ type TAliasBirdWing = TBirdWing{declaration:fdt_nestedaliasclass.TBird.TBirdWing}; TEagleWing = class(TAliasBirdWing{declaration:fdt_nestedaliasclass.TEagle.TAliasBirdWing}) public - procedure Fly; override; + procedure Fly{declaration:fdt_nestedaliasclass.TBird.TBirdWing.Fly}; override; end; end;