comp.lang.ada
 help / color / mirror / Atom feed
* Use of abstract tagged types without access types -- again and complete
@ 2011-06-09 17:50 Prof. Dr. Carl Weierstrass
  2011-06-09 20:19 ` Ludovic Brenta
  2011-06-09 20:41 ` Georg Bauhaus
  0 siblings, 2 replies; 6+ messages in thread
From: Prof. Dr. Carl Weierstrass @ 2011-06-09 17:50 UTC (permalink / raw)


Hi,

I have a question to all Ada gurus:

I want to do something like:

package Test is

   type Parent_Type is new Ada.Finalization.Controlled with private;
   type Child_Type is abstract new Ada.Finalization.Controlled with
private;
   type Child_Type_1 is new Child_Type with private;
   type Child_Type_N is new Child_Type with private;

private

   type Parent_Type is new Ada.Finalization.Controlled with record
         Child : Child_Type'Class;
   end record;
   type Child_Type is abstract new Ada.Finalization.Controlled with
null record;
   type Child_Type_1 is new Child_Type with null record;
   type Child_Type_N is new Child_Type with null record;

end Test;

This doesn't work, because:
class-wide subtype with unknown discriminants in component declaration

Of course I could use an access type to avoid the error but is there a
way to
do something like this without access types.


Regards



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

end of thread, other threads:[~2011-06-12 12:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-09 17:50 Use of abstract tagged types without access types -- again and complete Prof. Dr. Carl Weierstrass
2011-06-09 20:19 ` Ludovic Brenta
2011-06-09 21:06   ` Randy Brukardt
2011-06-10 15:43     ` Prof. Dr. Carl Weierstrass
2011-06-12 12:05       ` Alex R. Mosteo
2011-06-09 20:41 ` Georg Bauhaus

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