| 1 |
-- { dg-do compile } |
| 2 |
-- { dg-options "-gnatwu" } |
| 3 |
|
| 4 |
with Ada.Numerics.Discrete_Random; use Ada.Numerics; |
| 5 |
|
| 6 |
procedure Entry_Family is |
| 7 |
protected Family is |
| 8 |
entry Call (Boolean); |
| 9 |
end Family; |
| 10 |
|
| 11 |
protected body Family is |
| 12 |
entry Call (for P in Boolean) when True is |
| 13 |
begin |
| 14 |
null; |
| 15 |
end Call; |
| 16 |
|
| 17 |
end Family; |
| 18 |
|
| 19 |
package Random_Boolean is new Discrete_Random (Result_Subtype => Boolean); |
| 20 |
use Random_Boolean; |
| 21 |
|
| 22 |
Boolean_Generator : Generator; |
| 23 |
|
| 24 |
B : constant Boolean := Random (Boolean_Generator); |
| 25 |
|
| 26 |
begin |
| 27 |
Family.Call (B); |
| 28 |
end Entry_Family; |