On Mar 18, 8:54 am, Adam Beneschan <a...@[EMAIL PROTECTED]
> 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


|