then
null;
+ -- Subprogram renamings cannot be overridden
+
+ elsif Comes_From_Source (Subp)
+ and then Present (Alias (Subp))
+ then
+ null;
+
else
Error_Msg_NE
("type must be declared abstract or & overridden",
null;
-- Ada 2005 (AI-228): Calculate the "require overriding" and "abstract"
- -- properties of the subprogram, as defined in RM-3.9.3(4/2-6/2).
+ -- properties of the subprogram, as defined in RM-3.9.3(4/2-6/2). Note
+ -- that functions with controlling access results of record extensions
+ -- with a null extension part require overriding (AI95-00391/06).
-- Ada 202x (AI12-0042): Similarly, set those properties for
-- implementing the rule of RM 7.3.2(6.1/4).
and then Ekind (Etype (New_Subp)) =
E_Anonymous_Access_Type
and then Designated_Type (Etype (New_Subp)) =
- Derived_Type
- and then not Is_Null_Extension (Derived_Type))
+ Derived_Type)
or else (Comes_From_Source (Alias (New_Subp))
and then Is_EVF_Procedure (Alias (New_Subp)))