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,26a21b9e317dc639 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.181.13.205 with SMTP id fa13mr933486wid.3.1353448658430; Tue, 20 Nov 2012 13:57:38 -0800 (PST) MIME-Version: 1.0 X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 78.192.65.63 Path: q13ni334wii.0!nntp.google.com!proxad.net!feeder1-2.proxad.net!nntpfeed.proxad.net!news.muarf.org!news.ecp.fr!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Access type to member procedure of instance (Object Oriented programming in Ada) Date: Tue, 20 Nov 2012 15:57:37 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <9b0bcb37-8ae3-440f-af4f-a796702e4250@googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1353448658 10656 69.95.181.76 (20 Nov 2012 21:57:38 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 20 Nov 2012 21:57:38 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-RFC2646: Format=Flowed; Original Date: 2012-11-20T15:57:37-06:00 List-Id: "Brian Drummond" wrote in message news:k8fqd7$1hv$4@dont-email.me... > On Mon, 19 Nov 2012 11:39:03 +0000, Brian Drummond wrote: >> On Mon, 19 Nov 2012 01:59:42 -0800, ake.ragnar.dahlgren wrote: ... >>> Is it possible to create a parameterless access type to the >>> Message.Print procedure? The following application refuses to compile: >> >> Message.Print is not parameterless, it is identical to Print(Message) >> so ... no. > > Okay. I am astonished! > But I am more than happy to withdraw the above "no". I'm astonished, too. Unfortunately, I think this is depending on a compiler bug. (One that I'd encourage them to keep :-). Ada says that the properties of a renaming are the same as the renamed entity. Since the renamed entity in this case has convention Intrinsic, the renaming also should have convention Intrinsic (and thus the 'Access still should be illegal). Probably what's happening here is that the compiler is generating a wrapper to implement this rename, and it is allowing 'Access to be taken of this wrapper, because there is no implementation reason not to. But I don't think it should be allowed in language terms. Randy.