Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/tst/testbugfix/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 18.9.2025 mit Größe 549 B image not shown  

Quelle  2018-03-01-if-elif-crash.tst   Sprache: unbekannt

 
# Test for parser regression; the following code caused a segfault for
# a time. See https://github.com/gap-system/gap/issues/2226

#
gap> F:=function(x)
>   if true then
>     # Does not matter what is here
>   elif x=1 then
>     Assert(1, x=1);
>   fi;
> end;;

#
gap> F:=function(x)
>   if true then
>     # Does not matter what is here
>   elif x=1 then
>     Assert(1, x=1, "msg");
>   fi;
> end;;

#
gap> F:=function(x)
>   if true then
>     # Does not matter what is here
>   elif x=1 then
>     Info(InfoWarning, 1, "hi");
>   fi;
> end;;

[ Dauer der Verarbeitung: 0.2 Sekunden  (vorverarbeitet)  ]