1package Expr_Func3 is
2
3   type Obj_T is abstract tagged null record;
4
5   type T is access all Obj_T'Class;
6
7   function Slave (Obj : access Obj_T) return T is (T(Obj));
8
9   function Optional_Slave (Obj : T) return T;
10
11   procedure Dummy;
12
13private
14
15   function Optional_Slave (Obj : T) return T is
16    (if Obj = null then null else Slave (Obj));
17
18end Expr_Func3;
19