2019-12-12 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* sem_ch8.adb: Improve error message for dispatching subprogram
formals.
From-SVN: r279301
+2019-12-12 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch8.adb: Improve error message for dispatching subprogram
+ formals.
+
2019-12-12 Gary Dismukes <dismukes@adacore.com>
* exp_ch9.adb (Build_Protected_Entry): Set the Scope of the new
if Old_S_Ctrl_Type /= New_S_Ctrl_Type
or else No (New_S_Ctrl_Type)
then
- Error_Msg_NE
- ("actual must be dispatching subprogram for type&",
- Nam, New_S_Ctrl_Type);
+ if No (New_S_Ctrl_Type) then
+ Error_Msg_N
+ ("actual must be dispatching subprogram", Nam);
+ else
+ Error_Msg_NE
+ ("actual must be dispatching subprogram for type&",
+ Nam, New_S_Ctrl_Type);
+ end if;
else
Set_Is_Dispatching_Operation (New_S);