Skip to content

Commit 9dccd03

Browse files
committed
Fix crash on non-type objects.
1 parent 50874f4 commit 9dccd03

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

source/gnatdoc-comments-extractor-code_snippets.adb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,9 @@ package body GNATdoc.Comments.Extractor.Code_Snippets is
279279
and then not Node.As_Object_Decl.F_Default_Expr.Is_Null
280280
then
281281
declare
282-
Is_Array : Boolean := False;
282+
Is_Array : Boolean;
283283

284284
begin
285-
286285
if Node.As_Object_Decl.F_Type_Expr.Kind = Ada_Anonymous_Type
287286
and then Node.As_Object_Decl.F_Type_Expr.As_Anonymous_Type
288287
.F_Type_Decl.Kind = Ada_Anonymous_Type_Decl
@@ -308,7 +307,7 @@ package body GNATdoc.Comments.Extractor.Code_Snippets is
308307
Is_Array := True;
309308

310309
else
311-
raise Program_Error;
310+
Is_Array := False;
312311
end if;
313312

314313
if Is_Array then

0 commit comments

Comments
 (0)