summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/class_wide2.adb
blob: 9df54bf9071b11edf057b6c0f39d48a6472f7080 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
-- { dg-do compile }

package body Class_Wide2 is

   procedure Initialize is
      Var_Acc : Class_Acc := new Grand_Child;
      Var     : Grand_Child'Class := Grand_Child'Class (Var_Acc.all);

   begin
      Var := Grand_Child'Class (Var_Acc.all);
   end Initialize;

end Class_Wide2;