comp.lang.ada
 help / color / mirror / Atom feed
From: Dennis Hoppe <dennis.hoppe@hoppinet.de>
Subject: Re: Ada: Inheritance of generics
Date: Mon, 02 Jun 2008 16:17:48 +0200
Date: 2008-06-02T16:17:48+02:00	[thread overview]
Message-ID: <g20vec$1k1$1@aioe.org> (raw)
In-Reply-To: 

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




  reply	other threads:[~2008-06-02 14:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-02 13:39 Ada: Inheritance of generics Dennis Hoppe
2008-06-02 13:51 ` Dmitry A. Kazakov
2008-06-02 14:17   ` Dennis Hoppe [this message]
2008-06-02 14:34     ` Georg Bauhaus
2008-06-02 15:09     ` Dmitry A. Kazakov
2008-06-02 15:13     ` Adam Beneschan
2008-06-02 21:10       ` Dennis Hoppe
2008-06-02 14:30 ` Georg Bauhaus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox