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,b031c56dc601135,start X-Google-Attributes: gid103376,public Path: controlnews3.google.com!postnews1.google.com!not-for-mail From: 402450@cepsz.unizar.es (Jano) Newsgroups: comp.lang.ada Subject: Problem with access parameter Date: 25 May 2004 03:52:44 -0700 Organization: http://groups.google.com Message-ID: <5d6fdb61.0405250252.3a1f1f68@posting.google.com> NNTP-Posting-Host: 155.210.155.44 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1085482365 31437 127.0.0.1 (25 May 2004 10:52:45 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 25 May 2004 10:52:45 +0000 (UTC) Xref: controlnews3.google.com comp.lang.ada:815 Date: 2004-05-25T03:52:44-07:00 List-Id: 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;