From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 Path: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: Victor Porton Newsgroups: comp.lang.ada Subject: Why this program does not compile? (iterators) Date: Fri, 22 Aug 2014 20:18:45 +0300 Organization: Aioe.org NNTP Server Message-ID: NNTP-Posting-Host: AnnUDmZwVERVUXyHDyOl5A.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Complaints-To: abuse@aioe.org User-Agent: KNode/4.13.3 X-Notice: Filtered by postfilter v. 0.8.2 Xref: number.nntp.dca.giganews.com comp.lang.ada:188597 Date: 2014-08-22T20:18:45+03:00 List-Id: Why this program does not compile? gnatgcc -c -g -O2 -gnat2012 -g -O0 -gnato -fstack-check -gnatVa special_test.adb : In function ‘Special_Test’: : 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