aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/predicate6.ads
blob: 91e0adc87efe99fe7c2852f4d675189ced2d337e (plain)
1
2
3
4
5
6
7
8
9
10
generic
package Predicate6 is
   type Price_Kind is (Infinitely_Small, Normal, Infinitely_Large);
   subtype Infinite_Kind is Price_Kind with Static_Predicate =>
     Infinite_Kind in Infinitely_Small | Infinitely_Large;
   function "not" (Kind : Infinite_Kind) return Infinite_Kind is
     (case Kind is when Infinitely_Small => Infinitely_Large,
        when Infinitely_Large => Infinitely_Small);
   procedure Foo;
end;