From: ehsjony@ehs.ericsson.se (Jonas Nygren)
Subject: Visibility of private parts
Date: 1996/02/21
Date: 1996-02-21T00:00:00+00:00 [thread overview]
Message-ID: <4gf81d$p4b@erinews.ericsson.se> (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
next reply other threads:[~1996-02-21 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-02-21 0:00 Jonas Nygren [this message]
1996-02-21 0:00 ` Visibility of private parts David Weller
1996-02-21 0:00 ` Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox