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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4d972ac0c79198a5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-16 17:57:16 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!newsswitch.lcs.mit.edu!newsfeed.mathworks.com.MISMATCH!newsfeed!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Generic child units Date: 16 May 2003 20:57:15 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <3ec12f93$1@epflnews.epfl.ch> <3ec1f6ab$1@epflnews.epfl.ch> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1053133035 21305 199.172.62.241 (17 May 2003 00:57:15 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sat, 17 May 2003 00:57:15 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:37422 Date: 2003-05-16T20:57:15-04:00 List-Id: Georg Bauhaus writes: > Stephen Leake wrote: > : Robert A Duff writes: > : > :> Rodrigo Garc?a 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