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 X-Received: by 10.236.121.133 with SMTP id r5mr13561538yhh.28.1410085999831; Sun, 07 Sep 2014 03:33:19 -0700 (PDT) X-Received: by 10.140.30.201 with SMTP id d67mr10948qgd.8.1410085999790; Sun, 07 Sep 2014 03:33:19 -0700 (PDT) Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!m5no6459493qaj.0!news-out.google.com!i10ni0qaf.0!nntp.google.com!m5no6459487qaj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 7 Sep 2014 03:33:19 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2003:51:4a16:bd89:5d73:ab24:5ee3:34c9; posting-account=5zx--goAAAD06H29EnWQGKTO-gctuXHl NNTP-Posting-Host: 2003:51:4a16:bd89:5d73:ab24:5ee3:34c9 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <136dc796-8f60-4fc0-a2f8-70e0ca24c9f1@googlegroups.com> Subject: bug or feature From: Charly Injection-Date: Sun, 07 Sep 2014 10:33:19 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: number.nntp.dca.giganews.com comp.lang.ada:188903 Date: 2014-09-07T03:33:19-07:00 List-Id: Hi, I found the following strange behavior of gnat-gpl-2014 (ubuntu linux amd64) and I wonder, if it is a bug in gnat: I habe a package Datum_Pkg that defines a tagged type Datum and Datum_Vector (using Ada.Conainers.Vectors). In the main program I want to iterate over the vector (all irrelevant lines removed): 1 with Ada.Text_IO; 2 with Datum_Pkg; 3 4 procedure Main is 5 6 subtype Datum is Datum_Pkg.Datum; 7 subtype Datum_Vector is Datum_Pkg.Datum_Vectors.Vector; 8 9 D_Vec : Datum_Vector; 10 11 begin 12 13 for Dat : Datum_Pkg.Datum of D_Vec loop 14 Ada.Text_IO.Put_Line ("Datum=" & Dat.Image); 15 end loop; 16 17 for Dat : Datum of D_Vec loop 18 Ada.Text_IO.Put_Line ("Datum=" & Dat.Image); 19 end loop; 20 21 end Main; Line 13 compiles without message but in line 17 I get an error message: subtype indication does not match element type But this line should be equivalent to line 13 because of the subtype definition in line 6. Regards Charly