ada_language_server_23.0.0_66f2e7fb/testsuite/ada_lsp/definition_and_overridings/user.adb

 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
with Ada.Text_Io; use Ada.Text_Io;
with Ada.Tags;
with Class_Definition;

package body User is

   type C is new Class_Definition.A with
      record
         F : Integer := 0;
      end record;

   procedure P1 (Pc : C) is
   begin
      Put_Line
        ("Hi, I'm : "
         & Ada.Tags.Expanded_Name (Class_Definition.A'Class (Pc)'Tag));
   end P1;

   function Gen return Class_Definition.A'Class is
      Vc : C;
   begin
      return Class_Definition.A'Class (Vc);
   end Gen;

end User;