comp.lang.ada
 help / color / mirror / Atom feed
From: Tucker Taft <stt@averstar.com>
Subject: Re: Freezing question
Date: 1999/07/15
Date: 1999-07-15T00:00:00+00:00	[thread overview]
Message-ID: <378E57FE.FA7EEB99@averstar.com> (raw)
In-Reply-To: 7mlg18$qk0$1@nnrp1.deja.com

Ted Dennison wrote:
> 
> I have a problem with operations that don't seem to be getting
> inherited. I think it may be caused by a type being prematurely (for me
> anyway) frozen. I can't quite make out the LRM freezing rules. So I
> thought I'd ask here, does the second declaration below:
> 
>    type Fruit is abstract tagged private;
>    type Apple is abstract new Fruit with private;
> 
> freeze type "Fruit"?

No.  A private extension does not freeze its ancestor type.
A record extension does freeze its parent type.
If something is not being inherited, it might be because you
are declaring the type in something other than a package spec.
Only tagged types declared immediately within a package spec end
up with inheritable primitive subprograms.

I suppose another problem is that, for a private extension, the
set of inherited operations is determined by those of the ancestor
at the point where the private extension is declared.

If freezing were your problem, you would get error messages from
the compiler, rather than mysterious loss of inheritance.


> T.E.D.

-- 
-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




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

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-15  0:00 Freezing question Ted Dennison
1999-07-15  0:00 ` Tucker Taft [this message]
1999-07-16  0:00   ` Ted Dennison
1999-07-19  0:00     ` Tucker Taft
1999-07-19  0:00       ` Ted Dennison
1999-07-19  0:00         ` Robert I. Eachus
1999-07-20  0:00           ` Ted Dennison
1999-07-19  0:00       ` Dispatching with a child for a parameter? (was: Freezing question) Ted Dennison
replies disabled

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