Debian Codegraph @

gcc/testsuite/gnat.dg/specs/finalizable2.ads

raw
1 -- { dg-do compile }
2 -- { dg-options "-gnatX0" }
3
4 package Finalizable2 is
5
6 type Root is abstract tagged limited null record
7 with Finalizable => (Initialize => Initialize);
8
9 procedure Initialize (this : in out Root) is abstract;
10
11 type Ext (L : Natural) is new Root with record
12 A : String (1 .. L);
13 end record;
14
15 overriding procedure Initialize (this : in out Ext) is null;
16
17 function Make return Ext is (L => 3, A => "asd");
18
19 Obj : Ext := Make;
20
21 end Finalizable2;