comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Private Children
Date: 1999/06/20
Date: 1999-06-20T00:00:00+00:00	[thread overview]
Message-ID: <m3bteacxb8.fsf@mheaney.ni.net> (raw)

Can a public child package with its private sibling?

According to my compiler, the answer is no.  When I try to compile the
unit below (P.C2), I get the following error message:

gcc -c -gnatc /home/matt/p-c2.ads
p-c2.ads:1:06: current unit must also be private descendant of "P"


Public child P.C2 only uses the entity provided by its private sibling
P.C1 in its private region.  What is the rationale for making this
illegal?



--STX
package P is

   pragma Pure;

end P;


private package P.C1 is

  I1 : Integer;

end P.C1;


with P.C1;
package P.C2 is

  I2 : Integer;

private

  I3 : Integer := P.C1.I1;

end P.C2;




             reply	other threads:[~1999-06-20  0:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-20  0:00 Matthew Heaney [this message]
1999-06-21  0:00 ` Private Children Ted Dennison
1999-06-21  0:00   ` Tucker Taft
1999-06-21  0:00     ` Matthew Heaney
1999-06-21  0:00       ` Tucker Taft
1999-06-22  0:00         ` Richard D Riehle
1999-06-22  0:00           ` Dale Stanbrough
1999-06-22  0:00             ` Matthew Heaney
1999-06-23  0:00               ` Dale Stanbrough
1999-06-23  0:00                 ` Matthew Heaney
1999-06-23  0:00                   ` Dale Stanbrough
1999-06-23  0:00                     ` Richard D Riehle
1999-06-23  0:00                       ` John Duncan
1999-06-23  0:00                       ` Vladimir Olensky
1999-06-23  0:00                         ` Richard D Riehle
1999-06-24  0:00                           ` Hyman Rosen
1999-06-24  0:00                             ` Richard D Riehle
1999-06-24  0:00                       ` Dale Stanbrough
1999-06-22  0:00             ` Richard D Riehle
1999-06-21  0:00     ` Matthew Heaney
1999-06-25  0:00   ` Robert Dewar
1999-06-21  0:00 ` Dale Stanbrough
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox