comp.lang.ada
 help / color / mirror / Atom feed
* Construction initialization problem
@ 2008-12-04 16:08 Dmitry A. Kazakov
  2008-12-04 17:35 ` Adam Beneschan
  2008-12-04 22:17 ` Randy Brukardt
  0 siblings, 2 replies; 8+ messages in thread
From: Dmitry A. Kazakov @ 2008-12-04 16:08 UTC (permalink / 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



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

end of thread, other threads:[~2008-12-06 10:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-04 16:08 Construction initialization problem Dmitry A. Kazakov
2008-12-04 17:35 ` 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

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