1--  { dg-do compile }
2--  { dg-options "-Wall" }
3
4with Ada.Iterator_Interfaces;
5
6procedure Warn17 is
7
8   type Cursor is null record;
9
10   function Has_Element (Position : Cursor) return Boolean;
11
12   function Has_Element (Position : Cursor) return Boolean is (True);
13
14   package My_Iterator is
15     new Ada.Iterator_Interfaces (Cursor, Has_Element);
16
17   type Iterator is abstract new My_Iterator.Forward_Iterator with null record;
18
19   pragma Unreferenced (Iterator);
20begin
21   null;
22end Warn17;
23