mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-04 17:58:18 +02:00
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:
parent
57685b5e28
commit
32adb07f4c
@ -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]));
|
||||
|
Loading…
Reference in New Issue
Block a user