mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-11 02:02:35 +02:00
codetools: resolve indexed ancestor properties, bug #22687
git-svn-id: trunk@38421 -
This commit is contained in:
parent
859caab881
commit
8367792c04
@ -6943,11 +6943,27 @@ var
|
|||||||
exit;
|
exit;
|
||||||
if (not AtEnd)
|
if (not AtEnd)
|
||||||
and (Context.Node.Desc in [ctnProperty,ctnGlobalProperty])
|
and (Context.Node.Desc in [ctnProperty,ctnGlobalProperty])
|
||||||
and Context.Tool.PropertyNodeHasParamList(Context.Node)
|
|
||||||
then begin
|
then begin
|
||||||
|
with Context do begin
|
||||||
|
if Tool.PropNodeIsTypeLess(Node)
|
||||||
|
and Tool.MoveCursorToPropName(Node) then begin
|
||||||
|
// typeless property => search in ancestors: it can be property with parameters
|
||||||
|
Params.Save(OldInput);
|
||||||
|
Params.SetIdentifier(Tool,@Tool.Src[Tool.CurPos.StartPos],nil);
|
||||||
|
Params.Flags:=[fdfSearchInAncestors];
|
||||||
|
if Tool.FindIdentifierInAncestors(Node.Parent.Parent,Params) then begin
|
||||||
|
Tool:=Params.NewCodeTool;
|
||||||
|
Node:=Params.NewNode;
|
||||||
|
ExprType.Context:=Context;
|
||||||
|
end;
|
||||||
|
Params.Load(OldInput,true);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Context.Tool.PropertyNodeHasParamList(Context.Node) then begin
|
||||||
// the parameter list is resolved with the [] operators
|
// the parameter list is resolved with the [] operators
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
CurAliasType:=nil;
|
CurAliasType:=nil;
|
||||||
if AtEnd then CurAliasType:=AliasType;
|
if AtEnd then CurAliasType:=AliasType;
|
||||||
|
Loading…
Reference in New Issue
Block a user