From: Admin - Do Not Email <asmentis@gmail.com>
Subject: Re: child packages and nested packages
Date: Thu, 4 Mar 2010 06:55:07 -0800 (PST)
Date: 2010-03-04T06:55:07-08:00 [thread overview]
Message-ID: <2f692ee7-08e3-45b2-9da8-7d6ab5dc921b@o3g2000yqb.googlegroups.com> (raw)
In-Reply-To: hmngvk$bp5$00$1@news.t-online.com
On Mar 4, 12:37 am, Oliver Kellogg <okell...@users.sourceforge.net>
wrote:
> Referring back tohttp://groups.google.com/group/comp.lang.ada/msg/c14a79f7d21f5ebf,
>
> 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;
next prev parent reply other threads:[~2010-03-04 14:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-04 5:37 child packages and nested packages Oliver Kellogg
2010-03-04 14:55 ` Admin - Do Not Email [this message]
2010-03-04 16:12 ` Adam Beneschan
-- strict thread matches above, loose matches on Subject: below --
2002-03-23 15:02 Oliver Kellogg
2002-03-25 15:01 ` Ted Dennison
2002-03-25 19:26 ` Oliver Kellogg
2002-03-25 22:31 ` Stephen Leake
2002-04-23 21:44 ` Oliver Kellogg
2002-04-24 14:52 ` Oliver Kellogg
2002-03-26 14:21 ` Marin David Condic
2002-03-28 9:51 ` Oliver Kellogg
2002-03-28 14:49 ` Ted Dennison
2002-03-28 18:30 ` Oliver Kellogg
2002-03-28 22:13 ` Ted Dennison
2002-03-29 5:30 ` Oliver Kellogg
2002-03-29 11:59 ` Sergey Koshcheyev
2002-03-29 15:14 ` Ted Dennison
2002-03-29 13:05 ` Oliver Kellogg
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox