@@ -13522,8 +13522,7 @@ package body Sem_Ch12 is
Ancestor := Get_Instance_Of (Ancestor);
else
- Ancestor :=
- Get_Instance_Of (Base_Type (Get_Instance_Of (A_Gen_T)));
+ Ancestor := Get_Instance_Of (Etype (Get_Instance_Of (A_Gen_T)));
end if;
-- Check whether parent is a previous formal of the current generic
@@ -2304,7 +2304,9 @@ package body Sem_Ch4 is
while Present (It.Nam) loop
T := It.Typ;
- if No (First_Formal (Base_Type (Designated_Type (T)))) then
+ if Is_Access_Type (T)
+ and then No (First_Formal (Base_Type (Designated_Type (T))))
+ then
Set_Etype (P, T);
else
Remove_Interp (I);