comp.lang.ada
 help / color / mirror / Atom feed
* Ada0Y limited with
@ 2004-09-30 22:23 Wojtek Narczynski
  2004-09-30 23:40 ` Randy Brukardt
  0 siblings, 1 reply; 5+ messages in thread
From: Wojtek Narczynski @ 2004-09-30 22:23 UTC (permalink / raw)


Hello,

(GNAT in gcc mainline refuses compile the example from the "An invitation
to Ada 2005" presentation, claiming "circular unit dependency" error, so
I have serious problems trying to understand how this is supposed to work.)

Do I need to declare an access type every time I want to use a a type from
the limited-withed package, or can I just use the access type declared in
the limited-withed package?

Which of the following is code illegal?

with Parts;
package Whole is

   type Whole_Type is record
      Part : Parts.Part_Type;
   end record;

   type Whole_Access is access all Whole_Type;

end Whole;
 
 
limited with Whole;
package Parts is
 
   type Part_Type is record
      Prev : Whole.Whole_Access;
      Next : access Whole.Whole_Type;
   end record;
 
end Parts;


Regards,
Wojtek



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

end of thread, other threads:[~2004-10-01 18:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-30 22:23 Ada0Y limited with Wojtek Narczynski
2004-09-30 23:40 ` Randy Brukardt
2004-10-01  7:52   ` Wojtek Narczynski
2004-10-01 18:30     ` Randy Brukardt
2004-10-01 18:51       ` Wojtek Narczynski

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