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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada design bug or GNAT bug? Date: Mon, 22 Jun 2015 20:16:38 +0200 Organization: cbb software GmbH Message-ID: References: <4lrj5zz2u2z.u8x9cf7xzic6.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: evoS9sCOdnHjo0GRLLMU1Q.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:26419 Date: 2015-06-22T20:16:38+02:00 List-Id: On Mon, 22 Jun 2015 12:39:16 -0500, Randy Brukardt wrote: > We don't have a choice about allowing hidden controlling results and > controlling access results (unless, of course, we want to abandon real > privacy, which we're not going to do). If function is invisible it is, and its result is as well. > The only way to avoid that problem is Which problem is? The operation is not visible, it cannot be called. > to not have the feature at all (which is where I would stand). I don't see connection to anonymous access types, the rule applies to tagged results as well: package P1 is type T1 is tagged null record; type T2 is new T1 with null record; function Foo return T2; end P1; with P1; use P1; package P2 is type T3 is new T1 with private; private type T3 is new T2 with null record; -- Legal! end P2; with P1; use P1; package P2 is type T3 is new T1 with private; private type T3 is new T2 with null record; overriding function Foo return T3; -- ILLEGAL! end P2; As such the rule does not make any sense. You shall under no circumstance prohibit overriding of inherited operations. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de