Visibility problems with package instantiations.....

From: Petter Fryklund (petter.fryklund_at_atero.se)
Date: 11/27/03


Date: 27 Nov 2003 07:42:40 -0800

We have the following:

generic
   type A is mod (<>);
   type B is mod (<>);
package Gen_0 is
   type C is
      record
         AA : A;
         BB : B;
      end record;
end Gen_0;

with Gen_0;
generic
   with package Inst_0 is new Gen_0 (<>);
package Gen_1 is
   procedure X (P1 : Inst_0.C);
end Gen_1;

with Gen_0;
generic
   with package Inst_0 is new Gen_0 (<>);
   with package Inst_1 is new Gen_1 (<>);
package Gen_2 is
   procedure X (P1 : Inst_0.C);
end Gen_2;

package body Gen_2 is
   procedure X (P1 : Inst_0.C) is
   begin
      Inst_1 (P1); <---- visibility problems.
   end X;
end Gen_2;

procedure Main is
   package Inst_0 is new Gen_0 (Interfaces.Unsigned_16, Interfaces.Unsigned_16);
   package Inst_1 is new Gen_1 (Inst_0);
   package Inst_2 is new Gen_2 (Inst_0, Inst_1);
begin
   Inst_2.X ...

Why?