comp.lang.ada
 help / color / mirror / Atom feed
* Problem with access parameter
@ 2004-05-25 10:52 Jano
  2004-05-25 14:00 ` Jim Rogers
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jano @ 2004-05-25 10:52 UTC (permalink / raw)


Hi,

I'm trying to finalize data inside a protected type, using the
approach pasted at the end. I'm not sure if I get this bizarre error
because of a Gnat 3.15p bug or because what I'm trying is illegal:

agpl-counter-multi.ads:59:04: expected an access type with designated
type "Object" defined at line 59
agpl-counter-multi.ads:59:04: found an access type with designated
type derived from "Object" defined at line 59
agpl-counter-multi.ads:59:04:   ==> in call to "_Init_Proc" at line 73

The package code is: (trimmed)

package Agpl.Counter.Multi is

   type Object;
   type Object_Access is access all Object;

   type Destructor_Type (Parent : access Object) is limited private; 

   ----------------------------------------------------------------
   -- Object                                                     --
   ----------------------------------------------------------------
   protected type Object is
      -- Things
   private
      procedure Destroy;
      Destructor : Destructor_Type (Object'Access);
      Values     : Counter_Map.Container_Type;
   end Object;

private

   type Destructor_Type (Parent : access Object) is new   
   Finalization.Limited_Controlled with null record;

   procedure Finalize (This : in out Destructor_Type);
   -- Here call to This.Parent.Destroy;

end Agpl.Counter.Multi;



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-05-27  9:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-25 10:52 Problem with access parameter Jano
2004-05-25 14:00 ` Jim Rogers
2004-05-25 15:32   ` Dmitry A. Kazakov
2004-05-25 14:58 ` Jano
2004-05-25 15:48 ` Jano
2004-05-26  7:05   ` Martin Krischik
2004-05-26 14:35     ` Jano
2004-05-26 16:11       ` Martin Krischik
2004-05-27  9:01         ` Jano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox