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,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,25589848af22007f,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-10 09:53:10 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!tank.news.pipex.net!pipex!diablo.dera.gov.uk!dera!not-for-mail From: "Stephen Cole" Newsgroups: comp.lang.ada Subject: Should the compiler accept this? Date: Wed, 10 Oct 2001 17:57:19 +0100 Organization: Defence Evaluation & Research Agency Message-ID: <9q1uah$6ir$1@trog.dera.gov.uk> NNTP-Posting-Host: 146.80.10.150 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: archiver1.google.com comp.lang.ada:14174 Date: 2001-10-10T17:57:19+01:00 List-Id: Hi Simple question 2...... package MyTstTypes is type MyRcd is abstract tagged record a: Integer; b: Float; end record; function Hello(A: MyRcd) return Integer is abstract; type MyNewRcd is new MyRcd with record c: Integer; end record; function Hello(A: MyNewRcd) return Integer; type MyNewRcd2 is new MyNewRcd with record d: Float; end record; function Add(A: MyRcd'class) return Integer; end MyTstTypes; 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()?