2 -- Reported by Georg Bauhaus <bauhaus@futureapps.de> */
9 type Source
is private;
10 type Target
is private;
11 function Conversion
(S
: Source
) return Target
;
13 function Conversion
(S
: Source
) return Target
is
14 type Source_Wrapper
is tagged record
17 type Target_Wrapper
is tagged record
21 type Selector
is (Source_Field
, Target_Field
);
22 type Magic
(Sel
: Selector
:= Target_Field
) is record
24 when Source_Field
=> S
: Source_Wrapper
;
25 when Target_Field
=> T
: Target_Wrapper
;
31 function Convert
(T
: Target_Wrapper
) return Target
is
33 M
:= (Sel
=> Source_Field
, S
=> (S
=> S
));
41 type Integer_Access
is access all Integer;
44 I_Access
: Integer_Access
:= I
'Access;
46 function Convert
is new Conversion
(Integer_Access
, Integer);
49 I
:= Convert
(I_Access
);