comp.lang.ada
 help / color / mirror / Atom feed
From: "Prof. Dr. Carl Weierstrass" <carl.weierstrass@googlemail.com>
Subject: Use of abstract tagged types without access types -- again and complete
Date: Thu, 9 Jun 2011 10:50:12 -0700 (PDT)
Date: 2011-06-09T10:50:12-07:00	[thread overview]
Message-ID: <53347692-e182-4f2f-8598-453af64e16fc@w36g2000vbi.googlegroups.com> (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



             reply	other threads:[~2011-06-09 17:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-09 17:50 Prof. Dr. Carl Weierstrass [this message]
2011-06-09 20:19 ` Use of abstract tagged types without access types -- again and complete 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
replies disabled

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