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-Thread: 103376,87cefb21a3c43af8 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.germany.com!feed.xsnews.nl!feeder.xsnews.nl!news.astraweb.com!newsrouter-eu.astraweb.com!proxad.net!cleanfeed3-b.proxad.net!nnrp14-2.free.fr!not-for-mail Message-Id: <44b93210$0$6521$636a55ce@news.free.fr> From: Yves Bailly Subject: Re: Trouble with overriding and class-wide parameters Newsgroups: comp.lang.ada Date: Sat, 15 Jul 2006 20:20:58 +0200 References: <44b91f16$0$27041$626a54ce@news.free.fr> User-Agent: KNode/0.10.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Organization: Guest of ProXad - France NNTP-Posting-Date: 15 Jul 2006 20:21:04 MEST NNTP-Posting-Host: 81.56.171.53 X-Trace: 1152987664 nnrp14-2.free.fr 6521 81.56.171.53:33205 X-Complaints-To: abuse@proxad.net Xref: g2news2.google.com comp.lang.ada:5709 Date: 2006-07-15T20:21:04+02:00 List-Id: Dmitry A. Kazakov wrote: > What are you trying to achieve? The code looks wrong to me. Why are you > using access types in a procedure? Why do you want to overload two > different Setup? If the second parameter has to be covariant then Ada does > support it: It's only a very reduced sample code, extracted from a much larger code base. The particular needs for access types are specific to this code base. That said, replace any "not null access" for the first parameters with "in out" and you'll get the same effect. The second parameter *has* to be an access type, as it can be null on purpose. See it as "parent object", in a tree-like structure (just to give an idea). I understand all of this might seem a little bit odd, now I really would like to understand what happens and why it's not the second Setup() (from Sub_Pkg) which is called. Regards, -- (o< | Yves Bailly : http://kafka-fr.net | -o) //\ | Linux Dijon : http://www.coagul.org | //\ \_/ | | \_/`