elsif Has_Delayed_Freeze (T) and then not Is_Frozen (T) then
Set_Has_Delayed_Freeze (Designator);
-
- elsif Is_Access_Type (T)
- and then Has_Delayed_Freeze (Designated_Type (T))
- and then not Is_Frozen (Designated_Type (T))
- then
- Set_Has_Delayed_Freeze (Designator);
end if;
end Possible_Freeze;
Next_Formal (F);
end loop;
+ -- RM 13.14 (15.1/6): the primitive subprograms of a tagged type are
+ -- frozen at the place where the type is frozen.
+
+ if Is_Dispatching_Operation (Designator) then
+ Set_Has_Delayed_Freeze (Designator);
+ end if;
+
-- Mark functions that return by reference. Note that it cannot be done
-- for delayed_freeze subprograms because the underlying returned type
-- may not be known yet (for private types).
-- respective counterparts.
procedure Check_Delayed_Subprogram (Designator : Entity_Id);
- -- Designator can be a E_Subprogram_Type, E_Procedure or E_Function. If a
- -- type in its profile depends on a private type without a full
- -- declaration, indicate that the subprogram or type is delayed.
+ -- Designator can be a E_Subprogram_Type, E_Procedure or E_Function. Set
+ -- Has_Delayed_Freeze on Designator if its freezing needs to be delayed.
procedure Check_Discriminant_Conformance
(N : Node_Id;
Param : Entity_Id;
begin
- Param := First_Entity (Typ);
+ Param := First_Formal (Typ);
loop
Write_Id (Param);
Write_Str (" : ");
end if;
Write_Id (Etype (Param));
- Next_Entity (Param);
+ Next_Formal (Param);
exit when No (Param);
Write_Str (", ");
end loop;