gcc/ada/
* einfo.adb (Has_Constrained_Partial_View): Apply Base_Type to Id.
* sem_res.adb (Resolve_Actuals.Check_Aliased_Parameter): Remove
"not Is_Generic_Type" test and call
Object_Type_Has_Constrained_Partial_View instead of
Has_Constrained_Partial_View. Improve related error message to
say "does not statically match" instead of just "does not
match".
function Has_Constrained_Partial_View (Id : E) return B is
begin
pragma Assert (Is_Type (Id));
- return Flag187 (Id);
+ return Flag187 (Base_Type (Id));
end Has_Constrained_Partial_View;
function Has_Controlled_Component (Id : E) return B is
elsif Has_Discriminants (F_Typ)
and then not Is_Constrained (F_Typ)
- and then not Has_Constrained_Partial_View (F_Typ)
- and then not Is_Generic_Type (F_Typ)
+ and then not Object_Type_Has_Constrained_Partial_View
+ (Typ => F_Typ, Scop => Current_Scope)
then
null;
else
- Error_Msg_NE ("untagged actual does not match "
+ Error_Msg_NE ("untagged actual does not statically match "
& "aliased formal&", A, F);
end if;