-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2004, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
if Is_Remote_Access_To_Subprogram_Type (E)
and then not Is_Remote_Access_To_Subprogram_Type (S)
then
- Error_Msg_N ("incorrect conversion of remote operand", N);
+ Error_Msg_N
+ ("incorrect conversion of remote operand to local type", N);
+ return;
+
+ elsif not Is_Remote_Access_To_Subprogram_Type (E)
+ and then Is_Remote_Access_To_Subprogram_Type (S)
+ then
+ Error_Msg_N
+ ("incorrect conversion of local operand to remote type", N);
return;
elsif Is_Remote_Access_To_Class_Wide_Type (E)
and then not Is_Remote_Access_To_Class_Wide_Type (S)
then
- Error_Msg_N ("incorrect conversion of remote operand", N);
+ Error_Msg_N
+ ("incorrect conversion of remote operand to local type", N);
return;
end if;
Found_Scope := Scope (Found_Scope);
exit when Expec_Scope = Standard_Standard
- or else
- Found_Scope = Standard_Standard
- or else
- not Comes_From_Source (Expec_Scope)
- or else
- not Comes_From_Source (Found_Scope);
+ or else Found_Scope = Standard_Standard
+ or else not Comes_From_Source (Expec_Scope)
+ or else not Comes_From_Source (Found_Scope);
end loop;
end;
- Error_Msg_NE ("expected}!", Expr, Expec_Type);
+ if Is_Record_Type (Expec_Type)
+ and then Present (Corresponding_Remote_Type (Expec_Type))
+ then
+ Error_Msg_NE ("expected}!", Expr,
+ Corresponding_Remote_Type (Expec_Type));
+ else
+ Error_Msg_NE ("expected}!", Expr, Expec_Type);
+ end if;
if Is_Entity_Name (Expr)
and then Is_Package (Entity (Expr))