comp.lang.ada
 help / color / mirror / Atom feed
* Package name duplication in Hierachical Libraries
@ 2002-01-02 10:51 Stuart Forster
  2002-01-02 12:52 ` Florian Weimer
  2002-01-04 14:11 ` Stephen Leake
  0 siblings, 2 replies; 3+ messages in thread
From: Stuart Forster @ 2002-01-02 10:51 UTC (permalink / 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;






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-01-04 14:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-02 10:51 Package name duplication in Hierachical Libraries Stuart Forster
2002-01-02 12:52 ` Florian Weimer
2002-01-04 14:11 ` Stephen Leake

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