codetools: class completion: nicer output on redefinition

git-svn-id: trunk@34994 -
This commit is contained in:
mattias 2012-01-28 17:25:12 +00:00
parent 325e87fb8e
commit 9b58ff9e5a

View File

@ -7881,11 +7881,14 @@ var
ANode:=ANodeExt2.Node; ANode:=ANodeExt2.Node;
ANode2:=ANodeExt.Node; ANode2:=ANodeExt.Node;
end; end;
debugln(['CheckForDoubleDefinedMethods redefined']);
debugln(' 1. ',ANodeExt.Txt,' ',CleanPosToStr(ANodeExt.Node.StartPos));
debugln(' 2. ',ANodeExt2.Txt,' ',CleanPosToStr(ANodeExt2.Node.StartPos));
CleanPosToCaret(ANode.FirstChild.StartPos,Caret1); CleanPosToCaret(ANode.FirstChild.StartPos,Caret1);
CleanPosToCaret(ANode2.FirstChild.StartPos,Caret2); CleanPosToCaret(ANode2.FirstChild.StartPos,Caret2);
s:=IntToStr(Caret2.Y)+','+IntToStr(Caret2.X); s:=IntToStr(Caret2.Y)+','+IntToStr(Caret2.X);
if Caret1.Code<>Caret2.Code then if Caret1.Code<>Caret2.Code then
s:=s+' in '+Caret2.Code.Filename; s:=s+' in '+CreateRelativePath(Caret2.Code.Filename,ExtractFilePath(Caret1.Code.Filename));
MoveCursorToNodeStart(ANode.FirstChild); MoveCursorToNodeStart(ANode.FirstChild);
RaiseException('procedure redefined (first at '+s+')'); RaiseException('procedure redefined (first at '+s+')');
end; end;