Debian Codegraph @

gcc/testsuite/gnat.dg/expr_func3.ads

raw
1 package 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
13 private
14
15 function Optional_Slave (Obj : T) return T is
16 (if Obj = null then null else Slave (Obj));
17
18 end Expr_Func3;