comp.lang.ada
 help / color / mirror / Atom feed
From: Tucker Taft <stt@averstar.com>
Subject: Re: meaning of "current instance"
Date: 1999/11/15
Date: 1999-11-15T00:00:00+00:00	[thread overview]
Message-ID: <38304D11.204F156A@averstar.com> (raw)
In-Reply-To: wcc7ljo3ld8.fsf@world.std.com

Robert A Duff wrote:
> 
> "Matthew Heaney" <matthew_heaney@acm.org> writes:
> 
> > I have some code below that I thought had a bug (um, I mean "error"),
> 
> ;-)
> 
> > but now I'm not so sure.
> >
> > Suppose I have this:
> >
> >   type T is tagged private;
> > ...
> >   function Init (O : access T'Class)
> >
> >   type T is
> >     tagged record
> >       I : Integer := Init (T'Access);
> >     end record;
> 
> I think you want T to be limited, or else use 'Unchecked_Access.

This is illegal, even if you use 'Unchecked_Access, unless T is limited,
because only if T is limited is the "view from the inside" aliased
(see 3.10(9) and 3.10.2(24)).  Just making it tagged is not enough.

> ...
-- 
-Tucker Taft   stt@averstar.com   http://www.averstar.com/~stt/
Technical Director, Distributed IT Solutions  (www.averstar.com/tools)
AverStar (formerly Intermetrics, Inc.)   Burlington, MA  USA




  parent reply	other threads:[~1999-11-15  0:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-11  0:00 meaning of "current instance" Matthew Heaney
1999-11-11  0:00 ` Robert A Duff
1999-11-11  0:00   ` Matthew Heaney
1999-11-11  0:00     ` Tucker Taft
1999-11-15  0:00   ` Tucker Taft [this message]
1999-11-15  0:00     ` tmoran
1999-11-15  0:00       ` Tucker Taft
1999-11-11  0:00 ` tmoran
1999-11-11  0:00   ` Matthew Heaney
1999-11-12  0:00     ` tmoran
1999-11-11  0:00       ` Matthew Heaney
1999-11-12  0:00         ` tmoran
1999-11-12  0:00           ` Matthew Heaney
1999-11-12  0:00             ` tmoran
1999-11-12  0:00               ` Matthew Heaney
1999-11-13  0:00             ` Robert A Duff
1999-11-13  0:00           ` Nick Roberts
1999-11-13  0:00             ` Robert A Duff
1999-11-14  0:00               ` tmoran
1999-11-13  0:00                 ` Matthew Heaney
1999-11-15  0:00                   ` John English
1999-11-15  0:00                     ` Matthew Heaney
replies disabled

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