comp.lang.ada
 help / color / mirror / Atom feed
From: nblanpain@hotmail.com
Subject: generic child class
Date: 7 Mar 2006 02:44:09 -0800
Date: 2006-03-07T02:44:09-08:00	[thread overview]
Message-ID: <1141728249.709680.183670@v46g2000cwv.googlegroups.com> (raw)

Hi,
I have a compilation error that i not understand. This is my example :

## Vec package ##
generic
type T_Real is digits <>;
package Vec is
end Vec;

## Mat package ##
with Vec;
generic
with package Vector is new Vec (<>);
package Mat is
end Mat;

## Mat.Child package ##
generic
type T_Tab is array (Integer) of Vector.T_Real;
package Mat.Child is
end Mat.Child;

## Test package ##
with Vec;
with Mat;
with Mat.Child;
package Test is
   package Vec_Float is new Vec (T_Real => Float);
   package Mat_Float is new Mat (Vector => Vec_Float);
   type T_Tableau is array (Integer) of Float;
   package Mat_Child_Float is new Mat_Float.Child (T_Tab => T_Tableau);
---- error !!!!!!!!!!
end Test;

The error message is :
"component subtype of actual does not match that of formal T_Tab "

have you an explaining ?

thanks,




             reply	other threads:[~2006-03-07 10:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-07 10:44 nblanpain [this message]
2006-03-07 11:31 ` generic child class Dmitry A. Kazakov
replies disabled

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