mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 13:50:06 +02:00
Codetools: Include fdfSearchInAncestors when resolving aliases, specializations or properties. "procedure SearchIdentifier" in "TFindDeclarationTool.FindBaseTypeOfNode". Fix issue #39498
Added test
This commit is contained in:
parent
0e3c87e83d
commit
de1c148c6e
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user