From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9fb7299100a4c4db X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Abstract realizations can't be inherited?? Date: 1998/08/29 Message-ID: #1/1 X-Deja-AN: 385984392 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.camb.inmet.com References: <6s6gku$gk6$1@nnrp1.dejanews.com> Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1998-08-29T00:00:00+00:00 List-Id: dennison@telepath.com wrote: : ... : 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. %-( This sounds like a compiler bug. If a type is non-abstract, then by defintion all of its primitive procedures are non-abstract, even if an overriding is done in the private part. Time to file a bug report... : -- : T.E.D. -- -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Burlington, MA USA