begin
pragma Assert (Is_Interface (Iface));
- -- Handle private types
-
- if Has_Private_Declaration (Typ)
- and then Present (Full_View (Typ))
- then
- Typ := Full_View (Typ);
- end if;
-
-- Handle access types
if Is_Access_Type (Typ) then
Typ := Directly_Designated_Type (Typ);
end if;
- -- Handle task and protected types implementing interfaces
+ -- Handle class-wide types
- if Is_Concurrent_Type (Typ) then
- Typ := Corresponding_Record_Type (Typ);
+ if Is_Class_Wide_Type (Typ) then
+ Typ := Root_Type (Typ);
end if;
- if Is_Class_Wide_Type (Typ) then
- Typ := Etype (Typ);
+ -- Handle private types
+
+ if Has_Private_Declaration (Typ)
+ and then Present (Full_View (Typ))
+ then
+ Typ := Full_View (Typ);
end if;
-- Handle entities from the limited view
Typ := Non_Limited_View (Typ);
end if;
+ -- Handle task and protected types implementing interfaces
+
+ if Is_Concurrent_Type (Typ) then
+ Typ := Corresponding_Record_Type (Typ);
+ end if;
+
Find_Tag (Typ);
pragma Assert (Found);
return AI_Tag;