comp.lang.ada
 help / color / mirror / Atom feed
From: AdaMagica <christ-usch.grein@t-online.de>
Subject: Re: Use of abstract tagged types without access types
Date: Thu, 9 Jun 2011 23:53:12 -0700 (PDT)
Date: 2011-06-09T23:53:12-07:00	[thread overview]
Message-ID: <4da7833f-e978-47bc-a39b-3dfb4c630193@z33g2000yqb.googlegroups.com> (raw)
In-Reply-To: 661061d7-cc2a-45ff-b7e2-28b8f885cd02@n10g2000vby.googlegroups.com

On 9 Jun., 19:44, "Prof. Dr. Carl Weierstrass"
<carl.weierstr...@googlemail.com> wrote:
>    type Parent_Type is new Ada.Finalization.Controlled with record
        Child : access Child_Type'Class;  -- You definitely need an
access here...
>    end record;
>
> Of course I could
... as (I'm sure) you wanted to say here. Tags are some kind of
(hidden) discriminant.

Alternatively:

  type Parent_Type (<>) --(Child: access Child_Type'Class)
    is new Ada.Finalization.Controlled with private;

private

  type Parent_Type (Child: access Child_Type'Class)
    is new Ada.Finalization.Controlled with null record;



  reply	other threads:[~2011-06-10  6:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-09 17:44 Use of abstract tagged types without access types Prof. Dr. Carl Weierstrass
2011-06-10  6:53 ` AdaMagica [this message]
2011-06-10  7:17   ` Simon Wright
2011-06-10  9:42     ` AdaMagica
2011-06-12  5:51 ` Yannick Duchêne (Hibou57)
replies disabled

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