okellogg@my-dejanews.com schrieb in Nachricht <7cikku$d4k$1@nnrp1.dejanews.com>... Your logic may be implemented by a function (func below) returning a classwide type or by using a classwide access type for the out parameter of procedure proc. Then the 2 objects in base.adb have to be aliased. The attached modified code compiles with ObjectAda and GNAT. J. Schr�er -- base.ads package Base is type Mytype is tagged null record; function Func return Mytype'Class; type Mytype_Access is access all Mytype'Class; procedure Proc (Result : out Mytype_Access); end Base; -- base-derived1.ads package Base.Derived1 is type Deriv1 is new Mytype with null record; end Base.Derived1; -- base-derived2.ads package Base.Derived2 is type Deriv2 is new Mytype with null record; end Base.Derived2; -- base.adb with Base.Derived1, Base.Derived2; package body Base is V1 : aliased Base.Derived1.Deriv1; V2 : aliased Base.Derived2.Deriv2; Some_Flag : Boolean := False; function Func return Mytype'Class is begin if Some_Flag then return V1; else return V2; end if; end Func; procedure Proc (Result : out Mytype_Access) is begin if Some_Flag then Result := V1'access; else Result := V2'access; end if; end Proc; end Base;