* access type must not be outside generic body
@ 2003-10-06 19:12 chris
2003-10-07 1:01 ` Matthew Heaney
0 siblings, 1 reply; 3+ messages in thread
From: chris @ 2003-10-06 19:12 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-10-07 8:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-06 19:12 access type must not be outside generic body chris
2003-10-07 1:01 ` Matthew Heaney
2003-10-07 8:26 ` chris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox