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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,f19ed823014e9b9a X-Google-Attributes: gid103376,public From: "Jean-Pierre Rosen" Subject: Re: generic formal object of class-wide type Date: 1999/04/29 Message-ID: <7gbiiu$hp5$1@wanadoo.fr>#1/1 X-Deja-AN: 472586111 Content-Transfer-Encoding: 8bit References: Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 X-Complaints-To: abuse@wanadoo.fr X-Trace: wanadoo.fr 925453726 18213 193.250.194.115 (30 Apr 1999 06:28:46 GMT) Organization: Adalog Mime-Version: 1.0 NNTP-Posting-Date: 30 Apr 1999 06:28:46 GMT Newsgroups: comp.lang.ada Date: 1999-04-30T06:28:46+00:00 List-Id: Matthew Heaney a �crit dans le message ... >When I try to compile package Q (see below), I get this error: > >q.ads:3:25: type of actual does not match type of "O" > >Why? > >Generic formal object O (in GQ) is of type P.T'Class. > >Actual object O is of specific type NT, yes, but that type is in >T'Class. So why isn't object O allowed as the actual for formal GC.O? > If the formal is declared as P.T'Class, the actual has to be P.T'Class (P.T'Class IS a type that follows (mostly) usual typing rules). If you want to allow for a type IN the class, you say that it is derived from P.T: generic type D is new P.T with private; --------------------------------------------------------- J-P. Rosen (Rosen.Adalog@wanadoo.fr) Visit Adalog's web site at http://perso.wanadoo.fr/adalog