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 X-Google-Thread: 103376,5c89acd494ea9116 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Self pointer in limited record Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1183577468.034566.57830@n60g2000hse.googlegroups.com> <1183631754.917400.257350@n2g2000hse.googlegroups.com> Date: Thu, 5 Jul 2007 14:36:19 +0200 Message-ID: <19w0yyso89x0a$.6oqm5hh3t7cr.dlg@40tude.net> NNTP-Posting-Date: 05 Jul 2007 14:33:06 CEST NNTP-Posting-Host: 67b1e7e6.newsspool3.arcor-online.net X-Trace: DXC=YZMOFR0glGPPU8j_I0DN6_McF=Q^Z^V3X4Fo<]lROoRQ^YC2XCjHcbYa[9]YO00PTRDNcfSJ;bb[UFCTGGVUmh?TLK[5LiR>kgRm@jR3XP_@?U X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:16421 Date: 2007-07-05T14:33:06+02:00 List-Id: On Thu, 05 Jul 2007 03:35:54 -0700, Maciej Sobczak wrote: > On 5 Lip, 10:22, "Dmitry A. Kazakov" > wrote: > >> 2. to re-dispatch from primitive operations: >> >> type T_Access is access all T'Class; -- Note 'Class >> type T is new Ada.Finalization.Limited_Controlled with record >> Self : T_Access := T'Unchecked_Access; >> >> procedure Bar (X : T); -- Primitive >> procedure Foo (X : T); -- Primitive >> >> procedure Foo (X : T) is >> Object : T'Class renames X.Self.all; >> begin >> Bar (X); -- This does not dispatch! >> Bar (Object.Self.all); -- This dispatches > > I guess Bar (Object) should be enough? Yes, of course. I was typing is faster than thinking... -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de