comp.lang.ada
 help / color / mirror / Atom feed
From: "Matthew Heaney" <mheaney@on2.com>
Subject: Re: Ada0Y anonymous access to self type
Date: Thu, 30 Sep 2004 16:47:00 -0400
Date: 2004-09-30T20:35:49+00:00	[thread overview]
Message-ID: <415c6e25$0$91007$39cecf19@news.twtelecom.net> (raw)
In-Reply-To: pan.2004.09.30.20.31.43.819322@power.com.pl


"Wojtek Narczynski" <wojtek@power.com.pl> wrote in message
news:pan.2004.09.30.20.31.43.819322@power.com.pl...
>
> type Foo_Type;
>
> -- This compiles
> type Bar_Type is record
>    Foo : access Foo_Type;
> end record;
>
> -- This does not
> type Foo_Type is record
>    Next : access Foo_Type;
> end record;
>
> For the Foo_Type record the compiler complains that "type declaration
> cannot refer to itself", but does this restriction serve any purpose?
>
> There was something about taming the "access types proliferation" in
Ada0Y...

Leave in the forward declaration of type Foo_Type, and see if that compiles.






  reply	other threads:[~2004-09-30 20:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-30 20:31 Ada0Y anonymous access to self type Wojtek Narczynski
2004-09-30 20:47 ` Matthew Heaney [this message]
2004-09-30 21:07   ` Wojtek Narczynski
2004-09-30 23:49 ` Randy Brukardt
replies disabled

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