Commit 3702225c by Arnaud Charlet

Minor reformatting.

From-SVN: r235711
parent f96fd197
...@@ -4980,7 +4980,6 @@ package body Sem_Attr is ...@@ -4980,7 +4980,6 @@ package body Sem_Attr is
-- type may lead to spurious errors if context is a case. -- type may lead to spurious errors if context is a case.
if not GNATprove_Mode then if not GNATprove_Mode then
if not Is_Discrete_Type (Pref_Typ) then if not Is_Discrete_Type (Pref_Typ) then
Pref_Typ := Base_Type (Pref_Typ); Pref_Typ := Base_Type (Pref_Typ);
end if; end if;
......
...@@ -4322,8 +4322,8 @@ package body Sem_Ch13 is ...@@ -4322,8 +4322,8 @@ package body Sem_Ch13 is
---------------------------- ----------------------------
function Valid_Default_Iterator (Subp : Entity_Id) return Boolean is function Valid_Default_Iterator (Subp : Entity_Id) return Boolean is
Formal : Entity_Id;
Root_T : constant Entity_Id := Root_Type (Etype (Etype (Subp))); Root_T : constant Entity_Id := Root_Type (Etype (Etype (Subp)));
Formal : Entity_Id;
begin begin
if not Check_Primitive_Function (Subp) then if not Check_Primitive_Function (Subp) then
...@@ -4422,7 +4422,7 @@ package body Sem_Ch13 is ...@@ -4422,7 +4422,7 @@ package body Sem_Ch13 is
Set_Is_Overloaded (Expr, False); Set_Is_Overloaded (Expr, False);
else else
Error_Msg_N Error_Msg_N
("No interpretation is a valid default iterator!", Expr); ("no interpretation is a valid default iterator!", Expr);
end if; end if;
end; end;
end if; end if;
......
...@@ -597,13 +597,15 @@ package body Sem_Ch4 is ...@@ -597,13 +597,15 @@ package body Sem_Ch4 is
if Is_Tagged_Type (Type_Id) if Is_Tagged_Type (Type_Id)
and then Has_Discriminants (Type_Id) and then Has_Discriminants (Type_Id)
and then not Is_Constrained (Type_Id) and then not Is_Constrained (Type_Id)
and then Present and then
(Discriminant_Default_Value (First_Discriminant (Type_Id))) Present
(Discriminant_Default_Value
(First_Discriminant (Type_Id)))
then then
declare declare
Constr : constant List_Id := New_List;
Loc : constant Source_Ptr := Sloc (E); Loc : constant Source_Ptr := Sloc (E);
Discr : Entity_Id := First_Discriminant (Type_Id); Discr : Entity_Id := First_Discriminant (Type_Id);
Constr : constant List_Id := New_List;
begin begin
if Present (Discriminant_Default_Value (Discr)) then if Present (Discriminant_Default_Value (Discr)) then
...@@ -612,11 +614,12 @@ package body Sem_Ch4 is ...@@ -612,11 +614,12 @@ package body Sem_Ch4 is
Next_Discriminant (Discr); Next_Discriminant (Discr);
end loop; end loop;
Rewrite (E, Make_Subtype_Indication (Loc, Rewrite (E,
Make_Subtype_Indication (Loc,
Subtype_Mark => New_Occurrence_Of (Type_Id, Loc), Subtype_Mark => New_Occurrence_Of (Type_Id, Loc),
Constraint => Constraint =>
Make_Index_Or_Discriminant_Constraint (Loc, Make_Index_Or_Discriminant_Constraint (Loc,
Constr))); Constraints => Constr)));
end if; end if;
end; end;
end if; end if;
......
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