comp.lang.ada
 help / color / mirror / Atom feed
From: lynch@cci.de
Subject: Renaming of overridden subprogram required?
Date: 1998/08/06
Date: 1998-08-06T00:00:00+00:00	[thread overview]
Message-ID: <6qbr1n$ulb$1@nnrp1.dejanews.com> (raw)

Hi,

we have some code similar to the following, which compiles fine under Gnat,
however Rational Apex wants an extra renaming:

package A is

   type Foo is Ada.Finalization.Controlled with private;
   ...
   type Ref is new Foo with private;
   ...
   function One (x : integer) return Ref;
   function Two (x : integer) return Ref renames One;
   ...
end A;

with A;
package B is

   type Ref is new A.Ref with null record;
   ...
      -- I know this is necessary, even though the
      -- bodies of A.One and B.One are identical
   function One (x : integer) return Ref;

      -- Rational Apex additionally requires this,
      -- Gnat does not!?!:
   function Two (x : integer) return Ref renames One;
   ...
end B;

If B.Two is not present Rational Apex quotes RM 3.9.3(6), however
Gnat seems quite happy.

Is Gnat being really nice and providing B.Two "for free", or have
we missed something?

Andrew.

P.S. Excuse the Deja News posting, our news server is rather screwed
up at the moment... :-(

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum




                 reply	other threads:[~1998-08-06  0:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

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