| 1 |
-- { dg-do compile } |
| 2 |
-- { dg-options "-Wall" } |
| 3 |
|
| 4 |
with Ada.Iterator_Interfaces; |
| 5 |
|
| 6 |
procedure 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); |
| 20 |
begin |
| 21 |
null; |
| 22 |
end Warn17; |