comp.lang.ada
 help / color / mirror / Atom feed
* Renaming of overridden subprogram required?
@ 1998-08-06  0:00 lynch
  0 siblings, 0 replies; only message in thread
From: lynch @ 1998-08-06  0:00 UTC (permalink / 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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-08-06  0:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-06  0:00 Renaming of overridden subprogram required? lynch

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