From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Why this program does not compile? (iterators)
Date: Fri, 22 Aug 2014 18:39:34 -0500
Date: 2014-08-22T18:39:34-05:00 [thread overview]
Message-ID: <lt8kbm$tgi$1@loke.gir.dk> (raw)
In-Reply-To: lt7u1i$6bn$1@speranza.aioe.org
Looks OK to me, probably a compiler bug of some sort. - Randy.
"Victor Porton" <porton@narod.ru> wrote in message
news:lt7u1i$6bn$1@speranza.aioe.org...
> Why this program does not compile?
>
> gnatgcc -c -g -O2 -gnat2012 -g -O0 -gnato -fstack-check -gnatVa
> special_test.adb
> <built-in>: In function 'Special_Test':
> <built-in>: error: aggregate value used where an integer was expected
>
> with Ada.Iterator_Interfaces;
>
> procedure Special_Test is
>
> type My_Description_Cursor is null record;
>
> function Has_Element (Position: My_Description_Cursor) return Boolean is
> (False);
>
> package My_Description_Iterators is new
> Ada.Iterator_Interfaces(My_Description_Cursor, Has_Element);
>
> type My_Description_Iterator is new
> My_Description_Iterators.Forward_Iterator with null record;
>
> overriding function First (Object: My_Description_Iterator) return
> My_Description_Cursor is (null record);
> overriding function Next (Object: My_Description_Iterator; Position:
> My_Description_Cursor) return My_Description_Cursor is (null record);
>
> My_Iterator: My_Description_Iterator;
>
> begin
> for C in My_Iterator loop
> null;
> end loop;
> end;
>
>
> --
> Victor Porton - http://portonvictor.org
next prev parent reply other threads:[~2014-08-22 23:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-22 17:18 Why this program does not compile? (iterators) Victor Porton
2014-08-22 23:39 ` Randy Brukardt [this message]
2014-08-23 4:56 ` Victor Porton
2014-08-23 0:15 ` Egil H H
2014-08-23 0:31 ` Adam Beneschan
2016-04-22 11:14 ` mockturtle
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox