blob: d8e27e0a73b74155774e035912c78496fbefae28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
package Prot6 is
generic
type TD is private;
type TI is synchronized interface;
package Set_Get is
type T is synchronized interface and TI;
procedure Set (E : in out T; D : TD) is abstract;
function Get (E : T) return TD is abstract;
end Set_Get;
type My_Type_Interface is synchronized interface;
package Set_Get_Integer is
new Set_Get (TD => Integer,
TI => My_Type_Interface);
use Set_Get_Integer;
protected type My_Type is
new Set_Get_Integer.T with
overriding procedure Set (D : Integer);
overriding function Get return Integer;
private
I : Integer;
end My_Type;
procedure Dummy;
end Prot6;
|