mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 12:56:14 +02:00
codetools: clean up
git-svn-id: trunk@29912 -
This commit is contained in:
parent
5a667e33d6
commit
f00e8050b6
@ -506,7 +506,7 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
MethodIsCompatible:=false;
|
||||
IdentIsmethod:=false;
|
||||
IdentIsMethod:=false;
|
||||
MethodIsPublished:=false;
|
||||
ActivateGlobalWriteLock;
|
||||
FreeAndNil(SearchedExprList);
|
||||
@ -518,9 +518,9 @@ begin
|
||||
Params.SetIdentifier(Self,@UpperMethodName[1],nil);
|
||||
Params.Flags:=[fdfSearchInAncestors];
|
||||
if FindIdentifierInContext(Params) then begin
|
||||
IdentIsmethod:=(Params.NewNode.Desc=ctnProcedure);
|
||||
IdentIsMethod:=(Params.NewNode.Desc=ctnProcedure);
|
||||
MethodIsPublished:=(Params.NewNode.Parent.Desc=ctnClassPublished);
|
||||
if IdentIsmethod and MethodIsPublished then begin
|
||||
if IdentIsMethod and MethodIsPublished then begin
|
||||
// published method with same name found
|
||||
FoundContext:=CreateFindContext(Params);
|
||||
// -> test for compatibility
|
||||
@ -530,6 +530,7 @@ begin
|
||||
if not CreateExprListFromMethodTypeData(TypeData,Params,SearchedExprList)
|
||||
then
|
||||
exit(false);
|
||||
debugln(['TEventsCodeTool.PublishedMethodExists SearchedExprList=[',SearchedExprList.AsString,']']);
|
||||
// create compatibility list
|
||||
CompListSize:=SizeOf(TTypeCompatibility)*SearchedExprList.Count;
|
||||
if CompListSize>0 then begin
|
||||
|
@ -7790,19 +7790,19 @@ begin
|
||||
|
||||
// check each parameter for compatibility
|
||||
|
||||
{$IFDEF ShowExprEval}
|
||||
{ $IFDEF ShowExprEval}
|
||||
DebugLn('[TFindDeclarationTool.IsParamNodeListCompatibleToExprList] ',
|
||||
' ExprParamList=[',TargetExprParamList.AsString,']');
|
||||
{$ENDIF}
|
||||
{ $ENDIF}
|
||||
ParamNode:=FirstSourceParameterNode;
|
||||
i:=0;
|
||||
while (ParamNode<>nil) and (i<TargetExprParamList.Count) do begin
|
||||
SourceExprType:=ConvertNodeToExpressionType(ParamNode,Params);
|
||||
ParamCompatibility:=IsCompatible(TargetExprParamList.Items[i],
|
||||
SourceExprType,Params);
|
||||
{$IFDEF ShowExprEval}
|
||||
DebugLn('[TFindDeclarationTool.IsParamNodeListCompatibleToExprList] B ',ExprTypeToString(TargetExprParamList.Items[i]),' ',TypeCompatibilityNames[ParamCompatibility]);
|
||||
{$ENDIF}
|
||||
{ $IFDEF ShowExprEval}
|
||||
DebugLn(['[TFindDeclarationTool.IsParamNodeListCompatibleToExprList] B ',i,' Source=[',ExprTypeToString(SourceExprType),'] Target=[',ExprTypeToString(TargetExprParamList.Items[i]),'] Result=',TypeCompatibilityNames[ParamCompatibility]]);
|
||||
{ $ENDIF}
|
||||
if CompatibilityList<>nil then
|
||||
CompatibilityList[i]:=ParamCompatibility;
|
||||
if ParamCompatibility=tcIncompatible then begin
|
||||
|
Loading…
Reference in New Issue
Block a user