c++: constrained lambda error-recovery [PR108972]
[official-gcc.git] / gcc / testsuite / gnat.dg / tag2.adb
blob77e4842ae97f419f66642808f42c105e6145e715
1 -- { dg-do run }
3 with Ada.Tags; use Ada.Tags;
4 with Tag2_Pkg; use Tag2_Pkg;
6 procedure Tag2 is
8 procedure Do_Add_Monitor (Monitor : in out Synchronous_Monitor) is
9 Name : constant String :=
10 Expanded_Name (Monitor_Interface'Class (Monitor)'Tag);
11 begin
12 if Name /= "TAG2_PKG.VIRTUAL_INTEGER_REGISTER_REFRESHER" then
13 raise Program_Error;
14 end if;
15 end;
17 Obj : Virtual_Integer_Register_Refresher (20);
18 begin
19 Do_Add_Monitor (Synchronous_Monitor (Obj));
20 end;