+2011-08-02 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
+ not set Overridden_Operation if subprogram is an initialization
+ procedure.
+
2011-08-02 Yannick Moy <moy@adacore.com>
* par-ch6.adb: Correct obsolete name in comments
end if;
elsif Is_Subprogram (Subp) then
- if No (Overridden_Operation (Subp)) then
+ if Is_Init_Proc (Subp) then
+ null;
+
+ elsif No (Overridden_Operation (Subp)) then
-- For entities generated by Derive_Subprograms the overridden
-- operation is the inherited primitive (which is available
and then Comes_From_Source (Alias (Overridden_Subp))
then
Set_Overridden_Operation (Subp, Alias (Overridden_Subp));
+
else
Set_Overridden_Operation (Subp, Overridden_Subp);
end if;
and then Comes_From_Source (Alias (E))
then
Set_Overridden_Operation (S, Alias (E));
- else
+
+ elsif not Is_Init_Proc (S) then
Set_Overridden_Operation (S, E);
end if;