From 8953ea90bf3ba0d5639f9d22f0c76222793a012f Mon Sep 17 00:00:00 2001 From: Brian Drummond Date: Fri, 13 Dec 2013 21:51:34 +0000 Subject: Patch for improved error message for https://gna.org/bugs/index.php?18360 --- sem_names.adb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sem_names.adb') diff --git a/sem_names.adb b/sem_names.adb index 9f16b36..65624a7 100644 --- a/sem_names.adb +++ b/sem_names.adb @@ -2386,7 +2386,10 @@ package body Sem_Names is Attr); return Error_Mark; when others => - raise Internal_Error; + Error_Msg_Sem ("Attribute '" + & Name_Table.Image(Get_Attribute_Identifier (Attr)) + & " not valid on this type", Attr); + return Error_Mark; end case; Location_Copy (Res, Attr); Prefix := Get_Named_Entity (Get_Prefix (Attr)); -- cgit