gcc/testsuite/gnat.dg/protected_type1.adb
raw| 1 | -- { dg-do compile } |
| 2 | |
| 3 | with Ada.Finalization; |
| 4 | |
| 5 | procedure Protected_Type1 is |
| 6 | |
| 7 | type T is new Ada.Finalization.Controlled with null record; |
| 8 | |
| 9 | protected type Queue is |
| 10 | entry Get_Next_Line (Line : out String); |
| 11 | private |
| 12 | A : T; |
| 13 | end Queue; |
| 14 | |
| 15 | protected body Queue is |
| 16 | entry Get_Next_Line (Line : out String) |
| 17 | when A /= (Ada.Finalization.Controlled with null record) is |
| 18 | begin |
| 19 | null; |
| 20 | end Get_Next_Line; |
| 21 | end Queue; |
| 22 | |
| 23 | begin |
| 24 | null; |
| 25 | end; |