comp.lang.ada
 help / color / mirror / Atom feed
* Private Children
@ 1999-06-20  0:00 Matthew Heaney
  1999-06-21  0:00 ` Ted Dennison
  1999-06-21  0:00 ` Dale Stanbrough
  0 siblings, 2 replies; 22+ messages in thread
From: Matthew Heaney @ 1999-06-20  0:00 UTC (permalink / 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;




^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~1999-06-25  0:00 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-20  0:00 Private Children Matthew Heaney
1999-06-21  0:00 ` Ted Dennison
1999-06-21  0:00   ` Tucker Taft
1999-06-21  0:00     ` Matthew Heaney
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             ` Richard D Riehle
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-25  0:00   ` Robert Dewar
1999-06-21  0:00 ` Dale Stanbrough

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