[Ada] ACATS 4.1P - BC55001 - Error missed
authorArnaud Charlet <charlet@adacore.com>
Mon, 6 Apr 2020 12:33:13 +0000 (08:33 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 16 Jun 2020 13:07:14 +0000 (09:07 -0400)
2020-06-16  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

* sem_ch6.adb (Analyze_Subprogram_Specification): Generate error
message for functions returning interfaces.

gcc/ada/sem_ch6.adb

index 188ee75..55f0c6b 100644 (file)
@@ -5464,9 +5464,7 @@ package body Sem_Ch6 is
                           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);