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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c0d188b409ece1ea X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-11 12:01:17 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.onemain.com!feed1.onemain.com!ord2-feed1.news.digex.net!sfo2-feed1.news.digex.net!intermedia!news-out.spamkiller.net!propagator-la!news-in-la.newsfeeds.com!news-in.superfeed.net!news.cesnet.cz!crax.cesnet.cz!news.felk.cvut.cz!not-for-mail From: "Sergey Koshcheyev" Newsgroups: comp.lang.ada Subject: Re: Designated type of actual does not match that of formal "name"? Date: Thu, 11 Oct 2001 20:54:49 +0200 Organization: Czech Technical University Message-ID: <9q4ptm$l7t$1@ns.felk.cvut.cz> References: NNTP-Posting-Host: l236.dkm.cz X-Trace: ns.felk.cvut.cz 1002826487 21757 62.24.77.236 (11 Oct 2001 18:54:47 GMT) X-Complaints-To: usenet@ns.felk.cvut.cz NNTP-Posting-Date: Thu, 11 Oct 2001 18:54:47 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Xref: archiver1.google.com comp.lang.ada:14317 Date: 2001-10-11T20:54:49+02:00 List-Id: "chris.danx" wrote in message news:gvlx7.5777$i14.731944@news2-win.server.ntlworld.com... > Hi, > > I'm trying to instantiate an instance of Ada.Unchecked_Deallocation on a > type which is defined as follows > > type xxx is new abc with private; -- where abc is abstract & limited; > type xxx_access is access all xxx'class; > > I tried > > procedure free is new ada.unchecked_deallocation (xxx, xxx_access); > > but it doesn't work. I get the error 'Designated type of actual does not > match that of formal "name"?'. What am I missing? Well, you're trying to pass it xxx as the object, but pointer to xxx'class as the pointer. This is what it doesn't like, since xxx /= xxx'class. Either pass xxx'class as the first parameter, or pointer to xxx as the second. > If there isn't a way around this then the record type which holds an item of > type xxx_access will have to be limited (and hold an item of type xxx > instead). That might not be such a bad idea in this instance, but I'd like > to know how what exactly the error means anyway. The type is not required to be limited for Unchecked_Deallocation. Sergey Koshcheyev.