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.107.135.150 with SMTP id r22mr55828165ioi.24.1448836818045; Sun, 29 Nov 2015 14:40:18 -0800 (PST) X-Received: by 10.182.148.165 with SMTP id tt5mr602531obb.20.1448836818019; Sun, 29 Nov 2015 14:40:18 -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!mv3no7436688igc.0!news-out.google.com!l1ni1igd.0!nntp.google.com!mv3no7436685igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 29 Nov 2015 14:40:17 -0800 (PST) In-Reply-To: <3d45e3ed-16ca-4018-bf7b-62830acaca03@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: <3d45e3ed-16ca-4018-bf7b-62830acaca03@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <726a04c8-f2eb-4f13-b5d9-b48f33ead884@googlegroups.com> Subject: Re: accessibility check failed From: Serge Robyns Injection-Date: Sun, 29 Nov 2015 22:40:18 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:28599 Date: 2015-11-29T14:40:17-08:00 List-Id: On Sunday, 29 November 2015 19:03:28 UTC+1, Serge Robyns wrote: > I'm facing a "mysterious" accessibility check failed error. I've managed to resolve my issue. It does work without using unchecked_access. However, during my attempts to understand I managed to create a stupid dummy program with 2 versions of implementing a store. One does not die, the other dies with accessibility error. I can send a zip to whomever wants to "study" it. Here is the main specifications with the main differences: with Abstract_Store; use Abstract_Store; with Clients; use Clients; with Clients.DAO; use Clients.DAO; package Store is type T_Store is limited new T_Asbtract_Store with record Clients : aliased T_Client_Store; end record; overriding procedure Store_Client (Self : not null access T_Store; Client : in T_Client'Class); overriding function Get_Client (Self : not null access T_Store; Id : in Integer) return T_Client'Class; type T_Store_2 is new T_Client_Store and T_Asbtract_Store with null record; end Store; T_Store does not "die" whereas T_Store_2 does on the return of Get_Client. In the case of T_Store the overriding function for T_Store is just performing a "return Self.Clients.Get_Client (Id);" In the case of T_Store_2 it does call the function directly through inheritance. T_Store requires me to write use a lot of "keystrokes" (writing the redirection calls) which I was hoping to save with T_Store_2. Serge