Commit c6ad817f by Javier Miranda Committed by Arnaud Charlet

exp_util.adb (Find_Interface_Tag): Reorder processing of incoming Typ argument…

exp_util.adb (Find_Interface_Tag): Reorder processing of incoming Typ argument to ensure proper management of...

2009-07-10  Javier Miranda  <miranda@adacore.com>

	* exp_util.adb (Find_Interface_Tag): Reorder processing of incoming
	Typ argument to ensure proper management of access types.

From-SVN: r149461
parent 9d9dacaa
...@@ -1600,28 +1600,24 @@ package body Exp_Util is ...@@ -1600,28 +1600,24 @@ package body Exp_Util is
begin begin
pragma Assert (Is_Interface (Iface)); 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 -- Handle access types
if Is_Access_Type (Typ) then if Is_Access_Type (Typ) then
Typ := Directly_Designated_Type (Typ); Typ := Directly_Designated_Type (Typ);
end if; end if;
-- Handle task and protected types implementing interfaces -- Handle class-wide types
if Is_Concurrent_Type (Typ) then if Is_Class_Wide_Type (Typ) then
Typ := Corresponding_Record_Type (Typ); Typ := Root_Type (Typ);
end if; end if;
if Is_Class_Wide_Type (Typ) then -- Handle private types
Typ := Etype (Typ);
if Has_Private_Declaration (Typ)
and then Present (Full_View (Typ))
then
Typ := Full_View (Typ);
end if; end if;
-- Handle entities from the limited view -- Handle entities from the limited view
...@@ -1631,6 +1627,12 @@ package body Exp_Util is ...@@ -1631,6 +1627,12 @@ package body Exp_Util is
Typ := Non_Limited_View (Typ); Typ := Non_Limited_View (Typ);
end if; 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); Find_Tag (Typ);
pragma Assert (Found); pragma Assert (Found);
return AI_Tag; return AI_Tag;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment