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,fb49422438d459d8,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-06 12:07:18 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.stueberl.de!newspeer1-gui.server.ntli.net!ntli.net!newsfep4-winn.server.ntli.net.POSTED!53ab2750!not-for-mail From: chris User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030925 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: access type must not be outside generic body Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Mon, 06 Oct 2003 20:12:46 +0100 NNTP-Posting-Host: 81.98.236.164 X-Complaints-To: abuse@ntlworld.com X-Trace: newsfep4-winn.server.ntli.net 1065467238 81.98.236.164 (Mon, 06 Oct 2003 20:07:18 BST) NNTP-Posting-Date: Mon, 06 Oct 2003 20:07:18 BST Organization: ntl Cablemodem News Service Xref: archiver1.google.com comp.lang.ada:328 Date: 2003-10-06T20:12:46+01:00 List-Id: Hi, What does this mean? I moved the offending code to the spec and it compiles fine. The situation looks something like this with aunit.xxx; generic type Test_Raster is new Raster with private; Raster_Name : string; package Test_Rasters is type Test_Case is new AUnit.Test_Cases.Test_Case with null record; procedure Register_Tests (T : in out Test_Case); function Name (T : in Test_Case) return String_Access; end Test_Rasters; package body Test_Rasters is -- touch each pixel to see only valid references exist! -- procedure Valid_Pixels_Test (T : in out AUnit.Test_Cases.Test_Case'Class); procedure Register_Tests (T : in out Test_Case) is begin Register_Routine (T, Valid_Pixels_Test'access, "Touch Valid Pixels"); end Register_Tests; function Name (T : in Test_Case) return String_Access is begin return new String'("Testing " & Raster_Name); end Name; procedure Valid_Pixels_Test (T : in out AUnit.Test_Cases.Test_Case'Class) is begin null; end Valid_Pixels_Test; end Test_Rasters; To me the error should be access type must not be in the generic body, but it says should not be outside of it. If the declaration of valid_pixels_test is moved to the private section of the spec, it goes away (will do what I expect though?). All the rasters function similarly, so ideally only 1 set of tests should be needed. Cheers, Chris