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: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!goblin3!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada design bug or GNAT bug? Date: Tue, 23 Jun 2015 16:30:25 +0200 Organization: cbb software GmbH Message-ID: <1u1egban2oimp.jwqseohm0zmj$.dlg@40tude.net> References: <4lrj5zz2u2z.u8x9cf7xzic6.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: enOx0b+nfqkc2k+TNpOejg.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: number.nntp.giganews.com comp.lang.ada:193736 Date: 2015-06-23T16:30:25+02:00 List-Id: On Tue, 23 Jun 2015 13:45:35 +0200, G.B. wrote: > On 22.06.15 20:16, Dmitry A. Kazakov wrote: > >> 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; > > Would this do, as it is, oddly maybe, accepted: > > with P1; > package P22 is > type T3 is new P1.T1 with private; > private > package Layer is > type T22 is new P1.T2 with null record; > private > overriding function Foo return T22; > end Layer; > type T3 is new Layer.T22 with null record; > end P22; You must ask Randy, as he sees problems with overriding Foo. You might be fool the compiler into accepting something that should be unacceptable according to him. My point was that having it unacceptable was a language design bug, access types or not regardless. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de