summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/iface_test.adb
blob: b47814f85d575f9d932b2ae61b568ce448c1eaf2 (plain)
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
26
27
28
--  { dg-do compile }
package body Iface_Test is
   protected SQLite_Safe is
      function Prepare_Select
        (DB   : DT_1;
         Iter : Standard.Iface_Test.Iface_2'Class)
      return Standard.Iface_Test.Iface_2'Class;
   end;

   overriding procedure Prepare_Select
     (DB   : DT_1;
      Iter : in out Standard.Iface_Test.Iface_2'Class)
   is
   begin
      Iter := SQLite_Safe.Prepare_Select (DB, Iter);  --  test
   end;

   protected body SQLite_Safe is
      function Prepare_Select
        (DB   : DT_1;
         Iter : Standard.Iface_Test.Iface_2'Class)
        return Standard.Iface_Test.Iface_2'Class
      is
      begin
         return Iter;
      end;
   end;
end;