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,1540032852ee6d61 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.net!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Why does this work? (overloads) Date: Wed, 07 Feb 2007 18:12:26 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1170823163.681564.186260@s48g2000cws.googlegroups.com> <1170876083.353327.155370@p10g2000cwp.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1170889946 926 192.74.137.71 (7 Feb 2007 23:12:26 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 7 Feb 2007 23:12:26 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:yGslRDnR1UAzQtLDMdqx+1UhZGY= Xref: g2news2.google.com comp.lang.ada:9113 Date: 2007-02-07T18:12:26-05:00 List-Id: "Adam Beneschan" writes: > On Feb 7, 11:02 am, "Jeffrey R. Carter" wrote: > >> You should be able to say >> >> V := T'(F) (5); >> >> to indicate a call to F1, but GNAT complains, saying a binary operator >> is expected between ')' and '('. This seems to be a compiler error. >> T'(F) should be a value of type T, which can then be indexed. After all, >> you can say >> >> X : constant T := T'(F); >> >> V : Integer := X (5); > > No, the compiler is right. The problem here is that the syntax of Ada > says that an index can be applied to a "name", but a qualified > expression is not a "name". I griped about this in AI05-0003. See > http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AI05s/AI05-0003-1.TXT? > rev=1.1 Right -- it's a language bug, not a compiler bug. - Bob