Codetools: Support Codecompletion inside "with begin end" block. May fix other cases, too. Issue #0023782, patch from jefferywa.

git-svn-id: trunk@62470 -
This commit is contained in:
juha 2019-12-30 13:59:12 +00:00
parent 56b70571c9
commit 29d750ae6a

View File

@ -7490,6 +7490,7 @@ function TFindDeclarationTool.FindAncestorOfClassInheritance(
var
InheritanceNode: TCodeTreeNode;
ClassNode: TCodeTreeNode;
SpecializeNode : TCodeTreeNode;
AncestorContext: TFindContext;
AncestorStartPos: LongInt;
ExprType: TExpressionType;
@ -7569,9 +7570,14 @@ begin
if (AncestorContext.Node.Desc in [ctnTypeDefinition,ctnGenericType]) then
begin
Params:=TFindDeclarationParams.Create;
if IdentifierNode.Desc=ctnSpecialize then begin
SpecializeNode:=IdentifierNode;
Params.SetGenericParamValues(Self, SpecializeNode);
end;
try
Params.Flags:=fdfDefaultForExpressions+[fdfFindChildren];
AncestorContext:=AncestorContext.Tool.FindBaseTypeOfNode(Params,AncestorContext.Node);
ResultParams.GenParams:=Params.GenParams;
finally
Params.Free;
end;