===================================================================
@@ -1817,7 +1817,7 @@
Bas : Entity_Id;
Typ : Entity_Id;
- -- Start of processing for Analyze_iterator_Specification
+ -- Start of processing for Analyze_Iterator_Specification
begin
Enter_Name (Def_Id);
@@ -2207,6 +2207,8 @@
-- be performed.
if Nkind (Orig_Iter_Name) = N_Selected_Component
+ and then
+ Present (Entity (Selector_Name (Orig_Iter_Name)))
and then Ekind_In
(Entity (Selector_Name (Orig_Iter_Name)),
E_Component,
===================================================================
@@ -7619,12 +7619,14 @@
begin
Typ := T;
+ -- Use the specific type when the parameter type is class-wide
+
if Is_Class_Wide_Type (Typ) then
Typ := Root_Type (Typ);
end if;
Ref := Empty;
- Typ := Underlying_Type (Typ);
+ Typ := Underlying_Type (Base_Type (Typ));
Inspect_Primitives (Typ, Ref);
Inspect_Declarations (Typ, Ref);