From: dennison@telepath.com
Subject: Re: Abstract realizations can't be inherited??
Date: 1998/08/28
Date: 1998-08-28T00:00:00+00:00 [thread overview]
Message-ID: <6s6gku$gk6$1@nnrp1.dejanews.com> (raw)
In-Reply-To: EyDBJB.6JH.0.-s@inmet.camb.inmet.com
In article <EyDBJB.6JH.0.-s@inmet.camb.inmet.com>,
stt@houdini.camb.inmet.com (Tucker Taft) wrote:
> This is not the intent of 3.9.3(6). It is only talking about the
> type from which the subprograms are inherited. For a record
> extension, it is the direct parent. For a private extension,
> it is whatever ancestor is specified.
Good. That's the way I'd expect it to work.
> It would be helpful if you included the relevant source code. It may
> either be that there is a compiler bug, or that the description above
> lacks some critical detail.
I had to move on, so that code isn't around in that form any more. However, I
rigged up a dummy example, and I think I see my problem. ...My problem with
the code anyway :-).
package Thingamabob is
type Instance is abstract tagged null record;
procedure Foo (On : in out Instance) is abstract;
end Thingamabob;
package Thingamabob.Big is
type Instance is new Thingamabob.Instance with private;
private
procedure Foo (On : in out Instance);
type Instance is new Thingamabob.Instance with null record;
end Thingamabob.Big;
with Thingamabob.Big;
package Big_And_Hairy_Thingamabob is
type Instance is new Thingamabob.Big.Instance with private;
private
type Instance is new Thingamabob.Big.Instance with null record;
end Big_And_Hairy_Thingamabob;
This gives me the error. But if I move the declartion of Thingamabob.Big.Foo
out of the private section, it works ok. So it looks like the real problem is
that I can't inherit a routine declared in the private section. That seems a
little more sensible.
The thing that makes that a little odd is that I can directly call
Thingamabob.Big.Foo, even though its declared in the private section. So for
the purposes of calling it isn't really "private", but for the purposes of
inheritance it is. %-(
--
T.E.D.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
next prev parent reply other threads:[~1998-08-28 0:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-08-27 0:00 Abstract realizations can't be inherited?? dennison
1998-08-27 0:00 ` dewar
1998-08-27 0:00 ` Tucker Taft
1998-08-28 0:00 ` dennison [this message]
1998-08-29 0:00 ` Tucker Taft
1998-08-31 0:00 ` dennison
1998-08-31 0:00 ` Tucker Taft
1998-08-31 0:00 ` 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