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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,87cefb21a3c43af8 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!tiscali!newsfeed1.ip.tiscali.net!proxad.net!cleanfeed1-a.proxad.net!nnrp10-1.free.fr!not-for-mail Return-Path: X-Greylist: delayed 1451 seconds by postgrey-1.24 at green; Sun, 16 Jul 2006 12:24:26 CEST In-Reply-To: <44b91f16$0$27041$626a54ce@news.free.fr> References: <44b91f16$0$27041$626a54ce@news.free.fr> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit From: Javier Miranda Subject: Re: Trouble with overriding and class-wide parameters Date: Sun, 16 Jul 2006 06:00:05 -0400 To: Yves Bailly X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: amavisd-new at ada-france.org Cc: comp.lang.ada@ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.8rc1 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.ada Message-ID: X-Leafnode-NNTP-Posting-Host: 88.191.17.134 Organization: Guest of ProXad - France NNTP-Posting-Date: 16 Jul 2006 12:29:01 MEST NNTP-Posting-Host: 88.191.14.223 X-Trace: 1153045741 nnrp10-1.free.fr 23586 88.191.14.223:58121 X-Complaints-To: abuse@proxad.net Xref: g2news2.google.com comp.lang.ada:5721 Date: 2006-07-16T12:29:01+02:00 On Jul 15, 2006, at 1:00 PM, Yves Bailly wrote: > Here's a problem I'm encountering, while developping a (rather > huge) library using Ada 2005, for now using only the latest GNAT > GPL compiler from AdaCore (i.e. GNAT-2006). > ... > > I would expect the call to Setup() to invoke the Sub_Pkg.Setup() > procedure, as "st" is of type Sub_Type. However the procedure > actually called is Pkg.Setup(), as shown by the output : > Pkg.Setup(Some_Type) > > What am I missing? I suspect the value "null" to be part of this, > but I can't find a workaround. This is a bug in the implementation of the Object.Operation notation in the compiler because your call to Setup should be diagnosed as ambiguous by the frontend. The workaround is just to use the Ada95 procedural notation (instead of the Ada 2005 object.operation notation). That is: Setup(st, null); We take care of fixing this problem in the next release of the compiler. Regards, ---- Javier Miranda