Codetools: Prevent a wrong error message about ancestor having same name. Issue #24502, patch from ocean.

git-svn-id: trunk@44513 -
This commit is contained in:
juha 2014-03-24 22:29:25 +00:00
parent 57685b5e28
commit 32adb07f4c

View File

@ -5768,13 +5768,6 @@ begin
AtomIsIdentifierE;
AncestorStartPos:=CurPos.StartPos;
end;
if (ClassIdentNode<>nil)
and (ClassIdentNode.Desc=ctnTypeDefinition)
and (CompareIdentifiers(@Src[AncestorStartPos],@Src[ClassIdentNode.StartPos])=0)
then begin
MoveCursorToCleanPos(AncestorStartPos);
RaiseException('ancestor has same name as class');
end;
{$IFDEF ShowTriedContexts}
DebugLn('[TFindDeclarationTool.FindAncestorOfClass] ',
' search ancestor class = ',GetIdentifier(@Src[AncestorStartPos]));