Skip to content

Commit d86fc02

Browse files
committed
Improve processing of "=" operators.
1 parent 8bda3b9 commit d86fc02

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

source/gnatdoc-comments-helpers.adb

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,13 +535,20 @@ package body GNATdoc.Comments.Helpers is
535535
return;
536536
end if;
537537

538-
-- LAL 20250922: `P_Most_Visible_Part` returns `null` for named
539-
-- numbers.
540-
541538
if Most_Visible_Decl.Is_Null then
542539
if Name.P_Basic_Decl.Kind = Ada_Number_Decl then
540+
-- LAL 20250922: `P_Most_Visible_Part` returns `null` for named
541+
-- numbers.
542+
543543
Most_Visible_Decl := Name.As_Defining_Name;
544544

545+
elsif Origin.Kind = Ada_Op_Eq then
546+
-- LAL 20250922: `P_Most_Visible_Part` returns `null` when
547+
-- `"="` function is declared in the private part of the package
548+
-- specification. Use first part to improve user experience.
549+
550+
Most_Visible_Decl := All_Decls (All_Decls'First);
551+
545552
else
546553
raise Program_Error;
547554
end if;

0 commit comments

Comments
 (0)