codetools: resolve indexed ancestor properties, bug #22687

git-svn-id: trunk@38421 -
This commit is contained in:
mattias 2012-08-28 19:55:36 +00:00
parent 859caab881
commit 8367792c04

View File

@ -6943,11 +6943,27 @@ var
exit;
if (not AtEnd)
and (Context.Node.Desc in [ctnProperty,ctnGlobalProperty])
and Context.Tool.PropertyNodeHasParamList(Context.Node)
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
exit;
end;
end;
CurAliasType:=nil;
if AtEnd then CurAliasType:=AliasType;