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,8660fe29f138b478 X-Google-Attributes: gid103376,public From: Tucker Taft Subject: Re: Freezing question Date: 1999/07/15 Message-ID: <378E57FE.FA7EEB99@averstar.com>#1/1 X-Deja-AN: 501494414 Content-Transfer-Encoding: 7bit Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.burl.averstar.com References: <7mlg18$qk0$1@nnrp1.deja.com> Content-Type: text/plain; charset=us-ascii Organization: AverStar (formerly Intermetrics) Burlington, MA USA Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-07-15T00:00:00+00:00 List-Id: 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