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-7-bit X-Google-Thread: 103376,f19ed823014e9b9a,start X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: generic formal object of class-wide type Date: 1999/04/29 Message-ID: #1/1 X-Deja-AN: 472218538 NNTP-Posting-Date: Thu, 29 Apr 1999 01:28:57 PDT Newsgroups: comp.lang.ada Date: 1999-04-29T00:00:00+00:00 List-Id: 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? package P is type T is abstract tagged limited null record; end; package P.C is type NT is new T with null record; O : NT; end; with P; generic O : in out P.T'Class; package GQ is end; with GQ, P.C; package Q is new GQ (P.C.O);