comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Got warnings when overriding Initialize and Finalize
Date: Fri, 10 Jul 2009 20:10:25 -0500
Date: 2009-07-10T20:10:25-05:00	[thread overview]
Message-ID: <h38ori$2v7$1@munin.nbi.dk> (raw)
In-Reply-To: 16dc507c-4b96-4b53-b46f-2e806f988e6e@h18g2000yqj.googlegroups.com

"Adam Beneschan" <adam@irvine.com> wrote in message 
news:16dc507c-4b96-4b53-b46f-2e806f988e6e@h18g2000yqj.googlegroups.com...
...
> Now, calling Op on an object of type T2 may give you either the
> inherited one or the overriding one, depending on whether the private
> part of Pak2 is visible at that point.  It may be that the compiler,
> with this case in mind, displays a warning any time there's an
> override in the private part of a package; but it seems like it's
> going overboard in this case.  The compiler needs to tailor its
> warnings a little better.  That's just my guess as to why you're
> seeing the warnings.  But there isn't anything wrong with your
> original code.

For the record, I agree with Adam. Claw is full of overridings like this; 
our rule was that overridings should be done in the private part as there is 
no reason for the client to know whether the routines are overridden or just 
inherited. Looks like a bogus warning to me (and Adam's explanation makes 
sense to me, too).

                                     Randy.






  parent reply	other threads:[~2009-07-11  1:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-10 14:16 Got warnings when overriding Initialize and Finalize Hibou57 (Yannick Duchêne)
2009-07-10 15:34 ` Adam Beneschan
2009-07-10 16:12   ` Hibou57 (Yannick Duchêne)
2009-07-11  1:10   ` Randy Brukardt [this message]
2009-07-14 14:54     ` Robert A Duff
replies disabled

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