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-Thread: 103376,9491b94351596175 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed.straub-nv.de!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: A problem with "interface" Date: 05 Feb 2009 17:13:31 +0100 Organization: Jacob Sparre Andersen Sender: sparre@jspa-nykredit Message-ID: <87skmseuac.fsf@nbi.dk> References: NNTP-Posting-Host: 79.138.243.26.bredband.3.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: munin.nbi.dk 1233850413 2248 79.138.243.26 (5 Feb 2009 16:13:33 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 5 Feb 2009 16:13:33 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 Xref: g2news1.google.com comp.lang.ada:3568 Date: 2009-02-05T17:13:31+01:00 List-Id: Robert_Matthews wrote: > In using interface types with GNAT I have encountered a problem. > Consider the following packages: > > package Int is > > type A is interface; > type B is interface; > > procedure P (Param1 : A; Param2 : B'Class) is abstract; > > end Int; > > with Int; > package Client is > > type Client_A is new Int.A with null record; > type Client_B is new Int.B with null record; > > overriding > procedure Client_P (Param1 : Client_A; Param2 : Client_B'Class); > > end Client; What procedure do you expect "Client_P" to override? If you happen to want to override the procedure "P", you might want to make sure the profile matches: overriding procedure P (Param1 : Client_A; Param2 : Int.B'Class); Greetings, Jacob -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin