(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?
package Whole is
type Whole_Type is record
Part : Parts.Part_Type;
type Whole_Access is access all Whole_Type;
limited with Whole;
package Parts is
type Part_Type is record
Prev : Whole.Whole_Access;
Next : access Whole.Whole_Type;