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,a3c2ec05bff4ab48 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!aioe.org!not-for-mail From: Dennis Hoppe Newsgroups: comp.lang.ada Subject: Re: Ada: Inheritance of generics Date: Mon, 02 Jun 2008 16:17:48 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <1d2swajw7rsue$.ftt2098a7wvt$.dlg@40tude.net> NNTP-Posting-Host: rfxIqsNOOcYSVIzBT0cW8Q.user.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org In-Reply-To: User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) Xref: g2news1.google.com comp.lang.ada:520 Date: 2008-06-02T16:17:48+02:00 List-Id: Dmitry A. Kazakov wrote: > On Mon, 02 Jun 2008 15:39:05 +0200, Dennis Hoppe wrote: > >> -- child unit >> generic >> -- omitted >> package Generic_Child is >> type Object is new Generic_Parent.Object with private; > > This is illegal. Generic_Parent is a generic unit, you cannot refer to > anything within it without either instantiation of, or else from a generic > child unit of. Generic_Child is not a child package of Generic_Parent. Hmm...this line is really a left over from simple inheritance without generic unit, but the Ada compiler does not complain about it. > P.S. Except for trivial cases, it is always better to post complete code > samples. I thought, this example was exhaustive: parent, child, instantiation. Best regards, Dennis