From: Adam Beneschan <adam@irvine.com>
Subject: Re: Discriminant ans tagged type ?!
Date: Tue, 18 Mar 2008 12:54:03 -0700 (PDT)
Date: 2008-03-18T12:54:03-07:00 [thread overview]
Message-ID: <6d529059-8109-4b17-845e-2a6e1430321c@i7g2000prf.googlegroups.com> (raw)
In-Reply-To: ad00d392-1f3e-47b5-a919-4f3b4ee3bcc4@i12g2000prf.googlegroups.com
On Mar 18, 8:54 am, Adam Beneschan <a...@irvine.com> wrote:
> However, I tried changing the declaration of T as follows:
>
> T : String (1 .. B.L);
>
> and GNAT accepted it. (I haven't done enough testing to make sure
> GNAT handles it correctly in other ways, though.) Here, B refers to
> the "current instance" of the type (8.6(17)), and 3.7(18) means that
> all instances of the type will have a component L that is inherited
> from A, so this should be legal unless there are some other rules that
> I've missed (and that GNAT also missed).
Never mind. After reading Bob's post, I got pointed to 3.8(10-12),
which disallows references to inherited discriminants in a type
extension. So I guess GNAT (or at least the version I'm using, which
is probably not the latest) is wrong to accept this. Sorry.
-- Adam
next prev parent reply other threads:[~2008-03-18 19:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-18 15:22 Discriminant ans tagged type ?! Tony
2008-03-18 15:54 ` Adam Beneschan
2008-03-18 19:54 ` Adam Beneschan [this message]
2008-03-21 8:18 ` Tony
2008-03-21 15:25 ` Adam Beneschan
2008-03-21 16:46 ` Simon Wright
2008-03-22 9:05 ` Tony
2008-04-04 15:40 ` Tom Grosman
2008-03-18 18:40 ` Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox