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,d402e2c741db0d0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-10 09:09:02 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!intern1.nntp.aus1.giganews.com!nntp.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 10 Jan 2004 11:09:00 -0600 Date: Sat, 10 Jan 2004 12:08:59 -0500 From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Language lawyer question: Equality on 'Access attributes References: <4LKdnRRNyv6AlmCiRVn-ig@comcast.com> <6bSdnYBKy_diPGCi4p2dnA@gbronline.com> <5a6dnSDERdpetGOi4p2dnA@gbronline.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.34.214.193 X-Trace: sv3-Md9n2dXlOc/ABbaVZkTurOJoVkIW+auQGHlRQZQviPXSkVsmAmCS8TamM14fuyAVHE75nCinUR7fgIV!htsWAYHLTlhcq9XNe2d1JlUTCO0hN8+Soc4r1ptagNRQMW5w1siKfppP0jf+6w== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: archiver1.google.com comp.lang.ada:4311 Date: 2004-01-10T12:08:59-05:00 List-Id: Dmitry A. Kazakov wrote: > Just summarizing... > > Your point is that the compiler should consider all visible types and all > visible "=" to crunch X'Access = Y'Access. Then X'Access = Y'Access is > illegal if there is no visible named access types. Then provided: > > type A is tagged null record; > type A_Ptr is access all A; > function "=" (Left : A_Ptr; Right : access A) return Boolean; > X : aliased A; > Y : aliased A; > > X'Access = Y'Access -- is ambiguous That I certainly agree with. But there are two further issues that MAY apply in the actual example. The first is that predefined operators don't need to be visible to be considered by overload resolution. (Usually there are other overload resolution rules that result in interpretations using invisible operators being eliminated.) The second is that the rule that anonymous access types don't have a predefined "=" operator is not a syntax or overload resolution rule. The combination of the above can result in an invisible anonymouns access Integer type creating an overload interpretation that is illegal rather than ignored. If RM 4.5.2(6) should be considered as a overloading rule, that eliminates potential problems in the original case. (However, the part of the 4.5.2(6) rule for limited types shouldn't become a name resolution rule. The rules for re-emergence of predefined equality for limited types are somewhat confusing, but changing them might be worse.) In any case, your example would still be illegal, since the user defined "=" is visible. -- Robert I. Eachus "The war on terror is a different kind of war, waged capture by capture, cell by cell, and victory by victory. Our security is assured by our perseverance and by our sure belief in the success of liberty." -- George W. Bush