Prefix =>
Unchecked_Convert_To (RTE (RE_Tag_Ptr),
Make_Attribute_Reference (Loc,
- Prefix => Duplicate_Subexpr (Lhs),
+ Prefix => Duplicate_Subexpr (Lhs),
Attribute_Name => Name_Address)));
Rhs_Tag :=
Make_Explicit_Dereference (Loc,
Prefix =>
Unchecked_Convert_To (RTE (RE_Tag_Ptr),
Make_Attribute_Reference (Loc,
- Prefix => Duplicate_Subexpr (Rhs),
+ Prefix => Duplicate_Subexpr (Rhs),
Attribute_Name => Name_Address)));
end if;
Make_Raise_Constraint_Error (Loc,
Condition =>
Make_Op_Ne (Loc,
- Left_Opnd => Lhs_Tag,
+ Left_Opnd => Lhs_Tag,
Right_Opnd => Rhs_Tag),
- Reason => CE_Tag_Check_Failed));
+ Reason => CE_Tag_Check_Failed));
end;
end if;
-- type may lead to spurious errors if context is a case.
if not GNATprove_Mode then
-
if not Is_Discrete_Type (Pref_Typ) then
Pref_Typ := Base_Type (Pref_Typ);
end if;
----------------------------
function Valid_Default_Iterator (Subp : Entity_Id) return Boolean is
- Formal : Entity_Id;
Root_T : constant Entity_Id := Root_Type (Etype (Etype (Subp)));
+ Formal : Entity_Id;
begin
if not Check_Primitive_Function (Subp) then
Set_Is_Overloaded (Expr, False);
else
Error_Msg_N
- ("No interpretation is a valid default iterator!", Expr);
+ ("no interpretation is a valid default iterator!", Expr);
end if;
end;
end if;
if Is_Tagged_Type (Type_Id)
and then Has_Discriminants (Type_Id)
and then not Is_Constrained (Type_Id)
- and then Present
- (Discriminant_Default_Value (First_Discriminant (Type_Id)))
+ and then
+ Present
+ (Discriminant_Default_Value
+ (First_Discriminant (Type_Id)))
then
declare
+ Constr : constant List_Id := New_List;
Loc : constant Source_Ptr := Sloc (E);
Discr : Entity_Id := First_Discriminant (Type_Id);
- Constr : constant List_Id := New_List;
begin
if Present (Discriminant_Default_Value (Discr)) then
Next_Discriminant (Discr);
end loop;
- Rewrite (E, Make_Subtype_Indication (Loc,
- Subtype_Mark => New_Occurrence_Of (Type_Id, Loc),
- Constraint =>
- Make_Index_Or_Discriminant_Constraint (Loc,
- Constr)));
+ Rewrite (E,
+ Make_Subtype_Indication (Loc,
+ Subtype_Mark => New_Occurrence_Of (Type_Id, Loc),
+ Constraint =>
+ Make_Index_Or_Discriminant_Constraint (Loc,
+ Constraints => Constr)));
end if;
end;
end if;
Error_Msg_N ("constraint not allowed here", E);
if Nkind (Constraint (E)) =
- N_Index_Or_Discriminant_Constraint
+ N_Index_Or_Discriminant_Constraint
then
Error_Msg_N -- CODEFIX
("\if qualified expression was meant, " &