comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Construction initialization problem
Date: Thu, 4 Dec 2008 17:08:28 +0100
Date: 2008-12-04T17:08:28+01:00	[thread overview]
Message-ID: <oscmgxrpod50$.g7h7snlssha0$.dlg@40tude.net> (raw)

Consider this:

   type A is tagged limited null record;
   type B (X : not null access A'Class) is tagged limited null record;

Now we want to specialize B so that its instances would already contain A:

   type C is new B with record
      Y : aliased A;
   end record;

Now there seems no way to either create an object of C so that C.X would
point to C.Y or else to derive from C a new type without discriminant:

   type D is new C (X => C.Y'Access) with null record; -- Illegal
   type D is new C (X => D.Y'Access) with null record; -- Illegal

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



             reply	other threads:[~2008-12-04 16:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-04 16:08 Dmitry A. Kazakov [this message]
2008-12-04 17:35 ` Construction initialization problem Adam Beneschan
2008-12-04 22:17 ` Randy Brukardt
2008-12-04 23:02   ` Adam Beneschan
2008-12-06  1:47     ` Randy Brukardt
2008-12-05  9:00   ` Dmitry A. Kazakov
2008-12-06  1:42     ` Randy Brukardt
2008-12-06 10:16       ` Dmitry A. Kazakov
replies disabled

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