summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/protected_self_ref2.adb
blob: 825c0cc40e79bc5b2c98c5776529e18c6a5aaa5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--  { dg-do compile }
procedure Protected_Self_Ref2 is

   protected type P is
      procedure Foo;
   end P;

   protected body P is
      procedure Foo is
	 D : Integer;
      begin
         D := P'Digits;  -- { dg-error "denotes current instance" }
      end;
   end P;

begin
   null;
end Protected_Self_Ref2;