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,5d6741c4f70b756c X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Dispatching in Generics Date: 1997/09/12 Message-ID: #1/1 X-Deja-AN: 271940265 References: <34183CD3.7F4@boeing.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-09-12T00:00:00+00:00 List-Id: In article <34183CD3.7F4@boeing.com>, Kevin Ingalls wrote: >generic > type T is tagged private; > with procedure put (T1 : T); >package G is > procedure cant_dispatch(TC : T'class); >end G; > >package body G is > procedure cant_dispatch(TC : T'class) is > begin > put (TC); -- the error occurs here > end cant_dispatch; >end G; Would the following solve your problem? Declare the formal type with (<>), and pass in Whatever_Type'Class during instantiation. Then, all calls within the generic will necessarily be dispatching. - Bob