comp.lang.ada
 help / color / mirror / Atom feed
From: "Stuart Forster" <stuart.forster@baesystems.com>
Subject: Package name duplication in Hierachical Libraries
Date: Wed, 2 Jan 2002 10:51:23 -0000
Date: 2002-01-02T10:51:23+00:00	[thread overview]
Message-ID: <3c32e619$1@pull.gecm.com> (raw)

I have a problem with duplicated package names in hierarchical libraries.

The example below results in an infinite recursion of B.A.C where I was
hoping for

>Test
B.A.C
A.C
>

Is this the correct behaviour?

I've only tried it on gnat 3.13p.

package A is
   procedure C;
end A;

with Text_IO;
package body A is
   procedure C is
   begin
      Text_IO.Put_Line("A.C");
   end C;
end A;

package B is
end B;

package B.A is
   procedure C;
end B.A;

with A;
with Text_IO;
package body B.A is
   procedure C is
   begin
      Text_IO.Put_Line("B.A.C");
      A.C;                                    -- Instead of calling A.C
calls B.A.C.
   end C;
end B.A;

with B.A;
procedure Test is
begin
   B.A.C;
end Test;






             reply	other threads:[~2002-01-02 10:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-02 10:51 Stuart Forster [this message]
2002-01-02 12:52 ` Package name duplication in Hierachical Libraries Florian Weimer
2002-01-04 14:11 ` Stephen Leake
replies disabled

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