comp.lang.ada
 help / color / mirror / Atom feed
* Visibility of private parts
@ 1996-02-21  0:00 Jonas Nygren
  1996-02-21  0:00 ` David Weller
  1996-02-21  0:00 ` Robert A Duff
  0 siblings, 2 replies; 3+ messages in thread
From: Jonas Nygren @ 1996-02-21  0:00 UTC (permalink / raw)



I believed that your private parts were hidden in Ada.

Though, the function Bs.Something manages to call 
As.As_Private_Parts though it is a private type 
with a private procedure in the short example below.

package As is
   type A is private;
private
   type A is tagged null record;
   procedure As_Private_Parts (An_A : in out A);
end As;

with As;
package Bs is
   type B is new As.A;
   procedure Something (A_B : in out B);
end Bs;

package body Bs is 
   procedure Something (A_B : in out B) is
   begin
      As_Private_Parts(A_B);
   end Something;
end Bs;

Compiling bs.adb does not report any error - how can that be?

Should B be allowed to see A's private parts?
Is it a feature or a bug?

/jonas





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

end of thread, other threads:[~1996-02-21  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-02-21  0:00 Visibility of private parts Jonas Nygren
1996-02-21  0:00 ` David Weller
1996-02-21  0:00 ` Robert A Duff

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