| 1 |
procedure Task5 is |
| 2 |
|
| 3 |
task type T is |
| 4 |
entry E (V1, V2 : Integer); |
| 5 |
end T; |
| 6 |
|
| 7 |
T_Obj : T; |
| 8 |
|
| 9 |
task body T is |
| 10 |
V1 : Integer; |
| 11 |
V2 : Integer; |
| 12 |
V3 : Integer; |
| 13 |
begin |
| 14 |
accept E (V1, V2 : Integer) do |
| 15 |
T.V1 := V1; |
| 16 |
T.V2 := V2; |
| 17 |
|
| 18 |
T_Obj.V1 := V1; -- { dg-error "invalid reference to private operation of some object of type \"T\"" } |
| 19 |
T_Obj.V2 := V2; -- { dg-error "invalid reference to private operation of some object of type \"T\"" } |
| 20 |
T_Obj.V3 := V3; -- { dg-error "invalid reference to private operation of some object of type \"T\"" } |
| 21 |
end E; |
| 22 |
end T; |
| 23 |
|
| 24 |
begin |
| 25 |
null; |
| 26 |
end Task5; |