From: "Hibou57 (Yannick Duchêne)" <yannick_duchene@yahoo.fr>
Subject: Re: Got warnings when overriding Initialize and Finalize
Date: Fri, 10 Jul 2009 09:12:04 -0700 (PDT)
Date: 2009-07-10T09:12:04-07:00 [thread overview]
Message-ID: <b7129878-8def-4d7f-9dbe-b74896278711@y17g2000yqn.googlegroups.com> (raw)
In-Reply-To: 16dc507c-4b96-4b53-b46f-2e806f988e6e@h18g2000yqj.googlegroups.com
On 10 juil, 17:34, Adam Beneschan <a...@irvine.com> wrote:
> There is a case, involving *untagged* types, where overriding an
> operation in the private part can lead to some unexpected results:
>
> package Pak2 is
> type T2 is new Pak1.T;
> -- inherits operation Op
> private
> overriding procedure Op (X : T2);
> end Pak2;
>
> 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.
Indeed, this example is a bad practice
> 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
.... and it does not take care it is a tagged type so
Your idea of the reason why is clever
next prev parent reply other threads:[~2009-07-10 16:12 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) [this message]
2009-07-11 1:10 ` Randy Brukardt
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