comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: child packages and nested packages
Date: Thu, 4 Mar 2010 08:12:45 -0800 (PST)
Date: 2010-03-04T08:12:45-08:00	[thread overview]
Message-ID: <8329703e-1c98-4679-aadc-387e27adb6af@t34g2000prm.googlegroups.com> (raw)
In-Reply-To: hmngvk$bp5$00$1@news.t-online.com

On Mar 3, 9:37 pm, Oliver Kellogg <okell...@users.sourceforge.net>
wrote:
> Referring back tohttp://groups.google.com/group/comp.lang.ada/msg/c14a79f7d21f5ebf,
>
> On Mar 29 2002, 2:05 pm, Oliver Kellogg wrote:
>
> > Sergey Koshcheyev <serk...@hotmail.com> wrote:
> > > Just a quick idea - maybe using "is separate" in some right places
> > > would solve it? Like having the spec of A.B.Impl inside A.B, and
> > > having the body separate.
>
> > That's definitely possible, but still only a workaround solution.
>
> I have to correct myself. It's not so definitely possible:
>
> -- file: a.ads
> package A is  -- module A
>    package B is     -- interface B
>       package Impl is
>          procedure X;
>       end Impl;
>    end B;
> end A;
>
> -- file: a.adb
> package body A is
>    package body B is
>       -- Implementation for interface B,
>       -- body to be provided by user
>       package body Impl is separate;
>    end B;
> end A;
>
> $ gcc -c a.adb
> a.adb:6:07: stub cannot appear in an inner scope

You can do it if you make B separate:

package body A is
   package body B is separate;
end A;

separate(A)
package body B is
   package body Impl is separate;
end B;

I'm not really familiar with the original problem so I don't know
whether this helps you any.

                                 -- Adam



  parent reply	other threads:[~2010-03-04 16:12 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
2010-03-04 16:12 ` Adam Beneschan [this message]
  -- 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