Commit 0f5abd21 by Ed Schonberg Committed by Pierre-Marie de Rodat

[Ada] Improve error message for dispatching subprogram formals

2019-12-12  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* sem_ch8.adb: Improve error message for dispatching subprogram
	formals.

From-SVN: r279301
parent ca00cd02
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> 2019-12-12 Gary Dismukes <dismukes@adacore.com>
* exp_ch9.adb (Build_Protected_Entry): Set the Scope of the new * exp_ch9.adb (Build_Protected_Entry): Set the Scope of the new
......
...@@ -3453,9 +3453,14 @@ package body Sem_Ch8 is ...@@ -3453,9 +3453,14 @@ package body Sem_Ch8 is
if Old_S_Ctrl_Type /= New_S_Ctrl_Type if Old_S_Ctrl_Type /= New_S_Ctrl_Type
or else No (New_S_Ctrl_Type) or else No (New_S_Ctrl_Type)
then then
Error_Msg_NE if No (New_S_Ctrl_Type) then
("actual must be dispatching subprogram for type&", Error_Msg_N
Nam, New_S_Ctrl_Type); ("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 else
Set_Is_Dispatching_Operation (New_S); Set_Is_Dispatching_Operation (New_S);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment