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,814577151c84863d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-16 06:45:12 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!tar-meneldur.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: which compiler is right? Date: Tue, 16 Mar 2004 15:56:18 +0100 Message-ID: References: NNTP-Posting-Host: tar-meneldur.cbb-automation.de (212.79.194.119) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1079448311 70325346 I 212.79.194.119 ([77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:6348 Date: 2004-03-16T15:56:18+01:00 List-Id: On Tue, 16 Mar 2004 14:44:27 +0100, Lionel.DRAGHI@fr.thalesgroup.com wrote: >Could someone, please, tell me if this code compile with other compilers >than GNAT and ObjectAda? >Or even better, is ObjectAda right in rejecting it? > >Thanks in advance package Pkg1 is type T_Event is abstract tagged null record; function Priority (Event : T_Event) return Natural is abstract; end Pkg1; -- --------------------------------------------------------------- with Pkg1; generic type T_Event (<>) is new Pkg1.T_Event with private; package Pkg2 is function Priority (Event : in T_Event) return Natural; Looks much like GNAT error. In any case the above makes little sense. If you want to override Priority you should declare a new type in Pkg2: generic type T_Event (<>) is abstract new Pkg1.T_Event with private; package Pkg2 is type New_T_Event is new T_Event with null record; function Priority (Event : in New_T_Event) return Natural; -- Regards, Dmitry Kazakov www.dmitry-kazakov.de