aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch3.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch3.adb')
-rw-r--r--gcc/ada/sem_ch3.adb10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index f9ccf5b..b899e01 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -15599,8 +15599,10 @@ package body Sem_Ch3 is
elsif Nkind (N) = N_Full_Type_Declaration
and then
- Nkind (Type_Definition (N)) = N_Record_Definition
- and then Interface_Present (Type_Definition (N))
+ (Nkind (Type_Definition (N)) = N_Record_Definition
+ or else Nkind (Type_Definition (N))
+ = N_Derived_Type_Definition)
+ and then Interface_Present (Type_Definition (N))
then
Error_Msg_N
("completion of private type cannot be an interface", N);
@@ -18307,8 +18309,8 @@ package body Sem_Ch3 is
if Present (Iface) then
Error_Msg_NE
- ("interface & not implemented by full type " &
- "(RM-2005 7.3 (7.3/2))", Priv_T, Iface);
+ ("interface in partial view& not implemented by full type " &
+ "(RM-2005 7.3 (7.3/2))", Full_T, Iface);
end if;
Iface := Find_Hidden_Interface (Full_T_Ifaces, Priv_T_Ifaces);