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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d58fe1ff04da7fd7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-17 09:56:36 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-02!sn-xit-01!supernews.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!psinet-eu-nl!psiuk-p4!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Ambiguous reference - What is wrong with this? Date: Fri, 17 Aug 2001 12:34:59 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9ljh3l$g4l$1@nh.pace.co.uk> References: <9lbf8n$brf$1@nh.pace.co.uk> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 998066101 16533 136.170.200.133 (17 Aug 2001 16:35:01 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 17 Aug 2001 16:35:01 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:12056 Date: 2001-08-17T16:35:01+00:00 List-Id: I just tried this with Gnat 3.13p and it seemed to work The question in my mind is will it do the thing I want it to do? I convert Object2 back to the base type & presumably everything is fine if the lower level Some_Proc wants to dynamically allocate something that matches. But have I prevented something from entering that isn't of the more specific Derive1 type? If converting back to the Base type finds a matching procedure, couldn't something that is not of Derive1 type enter the Some_Proc? In other words, if I'm using this to restrict some child type list from having data values put into it that don't match some more complex derived child class, am I not just circumventing that check? MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "Simon Wright" wrote in message news:x7v1ymdyhi0.fsf@smaug.pushface.org... > tmoran@acm.org writes: > > Root.Child1.Some_Proc ( > Object => Root.Child1.Derive1 (Object), > Object2 => Root.Base'Class (Object2)) ; > > compiles OK (GNAT 3.14a)