procedure Inherit_Predicate_Flags (Subt, Par : Entity_Id) is
begin
- Set_Has_Static_Predicate_Aspect (Subt,
- Has_Static_Predicate_Aspect (Par));
- Set_Has_Dynamic_Predicate_Aspect (Subt,
- Has_Dynamic_Predicate_Aspect (Par));
+ Set_Has_Static_Predicate_Aspect
+ (Subt, Has_Static_Predicate_Aspect (Par));
+ Set_Has_Dynamic_Predicate_Aspect
+ (Subt, Has_Dynamic_Predicate_Aspect (Par));
end Inherit_Predicate_Flags;
-----------------------
return;
end if;
- if Is_Generic_Formal (Typ) then
+ if Is_Generic_Formal (Typ)
+ and then Is_Discrete_Type (Typ)
+ then
Set_No_Predicate_On_Actual (Typ);
end if;
Error_Msg_Warn := SPARK_Mode /= On;
Error_Msg_FE (Msg & "<<", N, Typ);
Error_Msg_F ("\Program_Error [<<", N);
+
Insert_Action (N,
Make_Raise_Program_Error (Sloc (N),
Reason => PE_Bad_Predicated_Generic_Type));
+
else
Error_Msg_FE (Msg & "<<", N, Typ);
end if;
-- be a static subtype, since otherwise it would have
-- been diagnosed as illegal.
- elsif Is_Entity_Name (Choice) and then Is_Type (Entity (Choice))
+ elsif Is_Entity_Name (Choice) and then
+ Is_Type (Entity (Choice))
then
exit Search when Is_In_Range (Expr, Etype (Choice),
Assume_Valid => False);