comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Generic child units
Date: 16 May 2003 20:57:15 -0400
Date: 2003-05-16T20:57:15-04:00	[thread overview]
Message-ID: <wccn0hmie50.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: ba3tag$prs$2@a1-hrz.uni-duisburg.de

Georg Bauhaus <sb463ba@d2-hrz.uni-duisburg.de> writes:

> Stephen Leake <Stephe.Leake@nasa.gov> wrote:
> : Robert A Duff <bobduff@shell01.TheWorld.com> writes:
> : 
> :> Rodrigo Garc?a <rodrigo.garcia.ARROBA.epfl.ch> writes:
> :> 
> :> > Stephen Leake wrote:
> : 
> :> > > with Parent.Child;
> :> > > procedure Foo is
> :> > >    package Par is new Parent (Elem => Integer);
> :> > >    package Chi is new Par.Child;
> :> > > begin
> :> > > ...
> :> > > end Foo;
> :> 
> :> Here's the AARM text:
> :> 
> :>  18    A child of a parent generic package shall be instantiated or renamed
> :>  only within the declarative region of the parent generic.
> : 
> : But in my code above, Chi is an instantiation of "a child of a parent
> : generic package", and it is _not_ "within the declarative region of
> : the parent generic".

As Stephen Leake said later in his note, the above is wrong.  Chi is a
child of an *instance* of a parent generic (Par).  It is not a child of
Parent.

> Isn't the declarative region of Parent included by "with Parent.Child"? 

No.  The decl region of a thing is the thing and everything nested
within it (including children which are "logically" nested within their
parent).  Foo is not nested within Parent, and "with Parent.Child" does
not change that fact.

- Bob



  reply	other threads:[~2003-05-17  0:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-13 17:46 Generic child units 
2003-05-13 18:38 ` Stephen Leake
2003-05-13 19:18   ` David C. Hoos
2003-05-14  7:56   ` 
2003-05-15 16:30     ` Stephen Leake
2003-05-16  1:08     ` Robert A Duff
2003-05-16 19:24       ` Stephen Leake
2003-05-16 23:47         ` Georg Bauhaus
2003-05-17  0:57           ` Robert A Duff [this message]
2003-05-17  1:11             ` Georg Bauhaus
2003-05-17  1:04         ` Robert A Duff
2003-05-16 23:44       ` Georg Bauhaus
2003-05-17  0:23   ` Georg Bauhaus
2003-05-17  1:00     ` 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