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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,25589848af22007f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-10 10:12:44 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.news.rcn.net!rcn!chnws02.mediaone.net!chnws06.ne.mediaone.net!24.128.8.202!typhoon.ne.mediaone.net.POSTED!not-for-mail Message-ID: <3BC481C5.C04EBCB1@mediaone.net> From: Ed Falis X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.3 i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Should the compiler accept this? References: <9q1uah$6ir$1@trog.dera.gov.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 10 Oct 2001 17:12:14 GMT NNTP-Posting-Host: 24.60.16.59 X-Complaints-To: abuse@mediaone.net X-Trace: typhoon.ne.mediaone.net 1002733934 24.60.16.59 (Wed, 10 Oct 2001 13:12:14 EDT) NNTP-Posting-Date: Wed, 10 Oct 2001 13:12:14 EDT Organization: Road Runner Xref: archiver1.google.com comp.lang.ada:14180 Date: 2001-10-10T17:12:14+00:00 List-Id: Stephen Cole wrote: > The compiler is not complaining about it, but according to the rules of Ada > and not just what the compiler accepts, should I be defining a function > Hello() for derived type MyNewRcd2?? Or can I always assume that the Hello() > defined for type MyNewRcd will actually catch calls to Hello() made with an > actual MyNewRcd2 type variable passed as a parameter to Add()? No, because you're deriving MyNewRcd2 from MyNewRcd, which does provide a concrete version of Hello, and which is inheritied by MyNewRcd2. If you'd derived MyNewRcd2 directly from MyRcd, you would have had to provide a specific concrete Hello for it. - Ed