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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.36.61.149 with SMTP id n143mr7925904itn.48.1512393545110; Mon, 04 Dec 2017 05:19:05 -0800 (PST) X-Received: by 10.157.81.193 with SMTP id d1mr655668oth.13.1512393545026; Mon, 04 Dec 2017 05:19:05 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.kjsl.com!usenet.stanford.edu!193no1027343itr.0!news-out.google.com!s63ni3409itb.0!nntp.google.com!193no1027339itr.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 4 Dec 2017 05:19:04 -0800 (PST) In-Reply-To: <4ea6417a-d352-4af4-bfe5-241910bc9684@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2003:c7:83d0:5ce1:f437:98fe:9073:e3b9; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 2003:c7:83d0:5ce1:f437:98fe:9073:e3b9 References: <4db43571-7f86-4e73-8849-c41160927703@googlegroups.com> <6496a10f-c97e-4e42-b295-2478ad464b2f@googlegroups.com> <6106dfe6-c614-4fc1-aace-74bf8d7435e3@googlegroups.com> <24767ee5-cda8-45e4-98d1-7da44757bd40@googlegroups.com> <037e7f02-9149-4648-b7c5-91f67c1c1961@googlegroups.com> <4ea6417a-d352-4af4-bfe5-241910bc9684@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Extending a third party tagged type while adding finalization From: AdaMagica Injection-Date: Mon, 04 Dec 2017 13:19:05 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:49347 Date: 2017-12-04T05:19:04-08:00 List-Id: Am Montag, 4. Dezember 2017 13:38:05 UTC+1 schrieb AdaMagica: > Still illegal! > > Am Sonntag, 3. Dezember 2017 20:41:30 UTC+1 schrieb Dmitry A. Kazakov: > > Both typo errors/omissions are irrelevant to the point (of > > initialization ordering): > > > > type T is new Ada.Finalization.Controlled with record > > Self : not null access T'Class := T'Unchecked_Access; > GNAT complains: current instance must be an immutably limited type > > end record; The example can be made legal by making T limited. But: There is no Initialize defined for derived S. This is defined then implicitly as: procedure Initialize (X: in out S) is begin Initialize (T (X)); end Initialize; This is the calling sequence: Init S Init T Foo S