Create a record with a private part
According to this post, I'v try to do a record with a private part. What I've done :
MyFile.ads :
package MyPackage is
type T_MyType is tagged private;
private
type T_MyType_Private_Part;
type T_MyType_Private_Part_Access is access T_MyType_Pirvate_Part;
type T_MyType is tagged record
Toto : Boolean;
end record
end MyPackage;
MyFile.adb :
package body MyPackage is
type T_MyType_Private_Part is record
Private_Toto : Boolean;
end record
end MyPackage;
But when an other package do MyVar.Toto
where MyVar
is T_MyType
I have the error :
no selector "Toto" for type "T_MyType" defined at MyFile.ads
How can I fix this ?