| type Result is tagged record |

| with Iterable => (First => Pkg.First, -- { dg-error "primitive operation for Iterable type must appear in the same list of declarations as the type" } |

| Has_Element => Pkg.Has_Element, |

| function First (Dummy : T) return Natural is (0); |

| function Next (Dummy : T; Cursor : Natural) return Natural is |

| function Has_Element (Value : T; Cursor : Natural) return Boolean is |

| function Element (Dummy : T; Cursor : Natural) return Result is |

| ((B => Cursor mod 2 = 0)); |

| type T is new Root.T with record |