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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin3!goblin2!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Natasha Kerensikova Newsgroups: comp.lang.ada Subject: Re: How to hide inherited implementation of a public interface? Date: Fri, 21 Mar 2014 16:05:13 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <1alx2290srgwz$.fg1dxhbr9oq8.dlg@40tude.net> Injection-Date: Fri, 21 Mar 2014 16:05:13 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="76a49b86bc3e16725b7cfca3d85cb4c8"; logging-data="26761"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+uJ4w/a7VuZq/ISaALSqmD" User-Agent: slrn/1.0.1 (FreeBSD) Cancel-Lock: sha1:606elNNHNbT1kcLEk9uzOgH53bc= X-Original-Bytes: 2137 Xref: number.nntp.dca.giganews.com comp.lang.ada:185272 Date: 2014-03-21T16:05:13+00:00 List-Id: On 2014-03-21, Dmitry A. Kazakov wrote: > On Fri, 21 Mar 2014 12:53:45 +0000 (UTC), Natasha Kerensikova wrote: > >> So is there a way to publicly provide I.T while privately inheriting >> almost everything from A.T? > > Where is a problem? If I understand your example right, A.T publicly > implements I.T. Actually my problem was that I couldn't find what I was supposed to put instead of "-- What here?" to make my example work. It didn't occur to me that nothing was the correct answer, and all my attempts at declaring subprograms from the interface I.T where rejected by GNAT (and it still feels a bit weird to publicly declare having an interface without explicitly declaring any of the associated subprograms). Actually it almost occurred to me, but my attempt with nothing was reject by GNAT because I had something like "type T is new A.T with limited record ..." which produces a non-obvious error message. I should have investigated further on the minimal example instead of the real code. Anyway, problem solved, sorry for the noise /o\ Natasha