mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 09:56:12 +02:00
codetools: find declaration of default property without type
git-svn-id: trunk@35789 -
This commit is contained in:
parent
66f552f023
commit
2b47f40c2f
@ -7242,36 +7242,8 @@ var
|
|||||||
ExprType.Context.Tool.FindIdentifierInContext(Params);
|
ExprType.Context.Tool.FindIdentifierInContext(Params);
|
||||||
ExprType.Context:=CreateFindContext(Params);
|
ExprType.Context:=CreateFindContext(Params);
|
||||||
Params.Load(OldInput,true);
|
Params.Load(OldInput,true);
|
||||||
end;
|
ExprType.Context:=ExprType.Context.Tool.FindBaseTypeOfNode(Params,
|
||||||
// find base type of property
|
ExprType.Context.Node);
|
||||||
if ExprType.Context.Tool.ReadTilTypeOfProperty(ExprType.Context.Node)
|
|
||||||
then begin
|
|
||||||
// property has type
|
|
||||||
Params.Save(OldInput);
|
|
||||||
with ExprType.Context.Tool do
|
|
||||||
Params.SetIdentifier(ExprType.Context.Tool,
|
|
||||||
@Src[CurPos.StartPos],nil);
|
|
||||||
Params.Flags:=[fdfSearchInParentNodes,fdfExceptionOnNotFound]
|
|
||||||
+(fdfGlobals*Params.Flags);
|
|
||||||
Params.ContextNode:=ExprType.Context.Node.Parent;
|
|
||||||
if ExprType.Context.Tool.FindIdentifierInContext(Params) then begin
|
|
||||||
// only types allowed
|
|
||||||
if Params.NewNode.Desc=ctnTypeDefinition then begin
|
|
||||||
ExprType.Context:=CreateFindContext(Params);
|
|
||||||
end else if Params.NewNode.Desc=ctnGenericParameter then begin
|
|
||||||
if not Params.FindGenericParamType then
|
|
||||||
RaiseIdentInCurContextNotFound;
|
|
||||||
ExprType.Context.Tool:=Params.NewCodeTool;
|
|
||||||
ExprType.Context.Node:=Params.NewNode;
|
|
||||||
end else begin
|
|
||||||
// not a type
|
|
||||||
ExprType.Context.Tool.ReadTilTypeOfProperty(ExprType.Context.Node);
|
|
||||||
RaiseTypeIdentNotFound;
|
|
||||||
end;
|
|
||||||
end else begin
|
|
||||||
// predefined identifier
|
|
||||||
end;
|
|
||||||
Params.Load(OldInput,true);
|
|
||||||
end else
|
end else
|
||||||
RaiseIdentInCurContextNotFound;
|
RaiseIdentInCurContextNotFound;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user