2020-06-16 Arnaud Charlet <charlet@adacore.com>
gcc/ada/
* sem_ch6.adb (Analyze_Subprogram_Specification): Generate error
message for functions returning interfaces.
N_Formal_Abstract_Subprogram_Declaration,
N_Subprogram_Renaming_Declaration)
then
- if Is_Abstract_Type (Etype (Designator))
- and then not Is_Interface (Etype (Designator))
- then
+ if Is_Abstract_Type (Etype (Designator)) then
Error_Msg_N
("function that returns abstract type must be abstract", N);