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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,436e4ce138981b82 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-08 10:54:46 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: adam@irvine.com (Adam Beneschan) Newsgroups: comp.lang.ada Subject: Re: abstract sub programs overriding Date: 8 Mar 2004 10:54:45 -0800 Organization: http://groups.google.com Message-ID: References: <5f59677c.0403021101.4ac263d0@posting.google.com> <5f59677c.0403050702.5387352b@posting.google.com> NNTP-Posting-Host: 66.126.103.122 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1078772086 23133 127.0.0.1 (8 Mar 2004 18:54:46 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 8 Mar 2004 18:54:46 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:6161 Date: 2004-03-08T10:54:45-08:00 List-Id: Marius Amado Alves wrote in message news:... > On Friday 05 March 2004 15:02, Evangelista Sami wrote: > > ... > > it crashes on "Generate(El.all);" : > > raised CONSTRAINT_ERROR : main.adb:7 access check failed > > I'm surprised it compiles at all given that Generate is a private operation > (and therefore not available outside its declarative region). The "Generate" that the call refers to is declared in the public part of Generator, and is thus visible. Although this procedure is abstract, the call is dispatching (because El.all's type is class-wide), and thus legal. It is perfectly fine for dispatching calls to dispatch to subprograms that are not visible and couldn't be called directly. See 3.9.2(20), 7.3.1(6). -- Adam