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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!o3g2000yqb.googlegroups.com!not-for-mail From: Admin - Do Not Email Newsgroups: comp.lang.ada Subject: Re: child packages and nested packages Date: Thu, 4 Mar 2010 06:55:07 -0800 (PST) Organization: http://groups.google.com Message-ID: <2f692ee7-08e3-45b2-9da8-7d6ab5dc921b@o3g2000yqb.googlegroups.com> References: NNTP-Posting-Host: 134.240.241.3 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1267714507 1958 127.0.0.1 (4 Mar 2010 14:55:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 4 Mar 2010 14:55:07 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o3g2000yqb.googlegroups.com; posting-host=134.240.241.3; posting-account=CedHywoAAAAcVQwJt5x8TeyAwJA5ElaR User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:9405 Date: 2010-03-04T06:55:07-08:00 List-Id: On Mar 4, 12:37=A0am, Oliver Kellogg wrote: > Referring back tohttp://groups.google.com/group/comp.lang.ada/msg/c14a79f= 7d21f5ebf, > > Hello CLA, > > How come child packages are only possible for library level packages? > > I now encountered a situation where I'd like to create a child > package of a nested package: > > -- file: pkg.ads > package Pkg is > package Nested is > type Object is tagged null record; > end Nested; > end Pkg; > > -- file: pkg-nested-child.ads > package Pkg.Nested.Child is > type Derived is new Object with null record; > end Pkg.Nested.Child; I can't tell you *why* that's not allowed, but your supposition about additional work for the compiler makes sense. In this case, would the following work for you?: -- file: nested_child.ads with Pkg; use Pkg; use Pkg.Nested; package Nested_Child is type Derived is new Object with null record; end Nested_Child;