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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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 03:50:13 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!dialin-145-254-038-243.arcor-ip.NET!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Language lawyer question: Equality on 'Access attributes Date: Sat, 10 Jan 2004 12:56:44 +0100 Organization: At home Message-ID: References: <4LKdnRRNyv6AlmCiRVn-ig@comcast.com> <6bSdnYBKy_diPGCi4p2dnA@gbronline.com> <5a6dnSDERdpetGOi4p2dnA@gbronline.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-038-243.arcor-ip.net (145.254.38.243) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.uni-berlin.de 1073735412 10185899 145.254.38.243 ([77047]) User-Agent: KNode/0.7.2 Xref: archiver1.google.com comp.lang.ada:4300 Date: 2004-01-10T12:56:44+01:00 List-Id: Robert A Duff wrote: > Dmitry A. Kazakov writes: > >> What is the "expected type" in the case of X'Access = Y'Access? There >> is no one! So I think that GNAT formally does not contradict the >> standard. > > The expected type is the type of the formal parameter of "=". > There is only one such "=" of interest, and its formal parameter > has type Ptr1. 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 -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de