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-Thread: 103376,b0ad1d51e4ffa82b X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!e9g2000prf.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: access types Date: Mon, 02 Jul 2007 08:37:36 -0700 Organization: http://groups.google.com Message-ID: <1183390656.619041.233010@e9g2000prf.googlegroups.com> References: <3b3itu0t79zl$.czig4w8nzdmp.dlg@40tude.net> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1183390657 14481 127.0.0.1 (2 Jul 2007 15:37:37 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 2 Jul 2007 15:37:37 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: e9g2000prf.googlegroups.com; posting-host=66.126.103.122; posting-account=cw1zeQwAAABOY2vF_g6V_9cdsyY_wV9w Xref: g2news1.google.com comp.lang.ada:16386 Date: 2007-07-02T08:37:36-07:00 List-Id: On Jul 1, 7:57 am, Robert A Duff wrote: > "Dmitry A. Kazakov" writes: > > > On Sat, 30 Jun 2007 21:54:15 -0400, Robert A Duff wrote: > > >> Brian May writes: > > >>> V := U; > > >> Try V := U.all'Access. > > > No, that won't work, because the access types are pool-specific. > > Ah, thanks, I missed that. > > >... It is a > > nasty problem one has to fight all the way when dealing with tagged types > > and pool-specific access types. > > > Sorry, Brian, you probably have to resort to Unchecked_Conversion or else > > add "all" to your access types. > > "Doctor, it hurts when I forget 'all'." > > "So don't do that." > > ;-) > > Access-to-classwide should normally use "all". > In fact, you won't go too far wrong if you always say "all" > for all named access-to-variable types. In fact, if I'm interpreting the manual correctly, once you add "all" to the access types, then the type conversion should be legal: V := X_Reference(U); [Technically, only X_Reference has to be "access all" for this to be legal, but you should do this for both access types anyway.] -- Adam