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.8 required=5.0 tests=BAYES_00,PLING_QUERY autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d74cdcee29b02bcc X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!newscon02.news.prodigy.net!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Discriminant ans tagged type ?! Date: Tue, 18 Mar 2008 14:40:29 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <47dfde3d$0$26828$426a74cc@news.free.fr> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1205865631 10443 192.74.137.71 (18 Mar 2008 18:40:31 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 18 Mar 2008 18:40:31 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:qeCR740WCCihSnSoKo6zhB55zlo= Xref: g2news1.google.com comp.lang.ada:20468 Date: 2008-03-18T14:40:29-04:00 List-Id: Tony writes: > I just do not understand why the following code compiles with the Aonix > compiler and not with the Gnat GPL 2007? > > package A_Pkg is > type A (L : Natural) is tagged null record; > end A_Pkg; > > package A_Pkg.B_Pkg is > type B is new A with record > T : String(1..L); > end record; > end A_Pkg.B_Pkg; > > with A_Pkg.B_Pkg; > procedure Strange is > begin > null; > end Strange; > > => RM95 3.7 (18) ?? There's 3.9.1(8), which is a NOTE. If you want to do the above, you can say: type B (L : Natural) is new A(L) with ... - Bob