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.129.0.212 with SMTP id 203mr5357438ywa.19.1449614639477; Tue, 08 Dec 2015 14:43:59 -0800 (PST) X-Received: by 10.182.125.3 with SMTP id mm3mr38145obb.13.1449614639444; Tue, 08 Dec 2015 14:43:59 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!b51no7306761qgf.0!news-out.google.com!l1ni867igd.0!nntp.google.com!mv3no10665518igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 8 Dec 2015 14:43:59 -0800 (PST) In-Reply-To: <112596d0-d4ee-46e9-a02d-8de837aff352@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=109.88.54.35; posting-account=6m7axgkAAADBKh082FfZLdYsJ24CXYi5 NNTP-Posting-Host: 109.88.54.35 References: <8bc7fd76-f00a-4eea-9715-470af028fc84@googlegroups.com> <1krm4xun4e4ny.jmh9kvf6s0a9.dlg@40tude.net> <12dc7aea-933d-4271-95bd-10df808917e4@googlegroups.com> <5hfb2q9imjfu.zs3xp9gxw0d3.dlg@40tude.net> <5788b259-8886-4ee2-8c3d-7799abfd840e@googlegroups.com> <14acd8b0-a5e9-40fd-b7cc-d319f914d507@googlegroups.com> <112596d0-d4ee-46e9-a02d-8de837aff352@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: I'm facing an issue with: call to abstract procedure must be dispatching From: Serge Robyns Injection-Date: Tue, 08 Dec 2015 22:43:59 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:28722 Date: 2015-12-08T14:43:59-08:00 List-Id: On Tuesday, 8 December 2015 22:55:33 UTC+1, Serge Robyns wrote: > On Tuesday, 8 December 2015 22:09:13 UTC+1, Dmitry A. Kazakov wrote: > > On Tue, 8 Dec 2015 12:21:31 -0800 (PST), Serge Robyns wrote: > >=20 > > If you really need mix-in then better do it like this: > >=20 > > type T_Abstract_Data_Store > > ( Clients : not null access T_Abstract_Client'Class; > > Store2 : not null access T_Abstract_Store2'Class > > ) is abstract tagged limited record > >=20 > > This would add a bit more safety, much needed when using access types. >=20 Done, everything is completed and runs. The tag error was a "hidden" bug w= here I didn't return the right child class. Once I got around the issue th= e changes went quickly through and I would have had only one bug if I had u= sed the above construct immediately as the compiler wouldn't allowed me to = "forget". This is what amazes me with Ada. Now I've a generic question with regards to access type vs. in-out for para= meters. What is the proper Ada way to pass the "Store" around? Is it: Procedure Do_Something (A_Store : in out T_Abstract_Store'Class); or: Procedure Do_Something (A_Store : not null access T_Abstract_Store'Class); ? As a former C programmer my habit goes for the not null access variant. Regards, Serge