comp.lang.ada
 help / color / mirror / Atom feed
* losing visibility
@ 2000-10-23  2:32 tmoran
  2000-10-23  0:00 ` Pascal Obry
  2000-10-24  0:00 ` Tucker Taft
  0 siblings, 2 replies; 3+ messages in thread
From: tmoran @ 2000-10-23  2:32 UTC (permalink / raw)


Would someone please refresh my memory as to why "nucleus" should
become invisible in:

package one is
  type root is tagged private;
private
  type root is tagged record
    nucleus : integer;
  end record;
end one;

package one.two is
  package three is
    type child is new one.root with private;
  private
    type child is new one.root with record
      electrons : integer;
    end record;
  end three;

  package four is
    type grandkid is new three.child with null record;
    procedure initialize(x : in out grandkid);
  end four;

end one.Two;

package body one.Two is
  package body four is
    procedure initialize(x : in out grandkid) is
    begin
      x.nucleus := 1;      -- <<<<<<<<<<<<<< BAD nucleus not visible
    end initialize;
  end four;

  y : four.grandkid;

begin
  one.root(y).nucleus := 2;  -- <<<<<<<<<<<<<< OK, nucleus visible
  y.nucleus := 3;            -- <<<<<<<<<<<<<< BAD, nucleus not visible

end one.Two;

with one.Two;
procedure testvis is
begin null;end testvis;



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

end of thread, other threads:[~2000-10-24  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-23  2:32 losing visibility tmoran
2000-10-23  0:00 ` Pascal Obry
2000-10-24  0:00 ` Tucker Taft

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