Contrary to record aggregates, array aggregate cannot mix named and
positional associations. Make it clear in the error message.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_aggr.adb (Resolve_Array_Aggregate): Improve error message.diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
--- a/gcc/ada/sem_aggr.adb
+++ b/gcc/ada/sem_aggr.adb
@@ -1954,7 +1954,7 @@ package body Sem_Aggr is
or else (Nb_Choices = 1 and then not Others_Present))
then
Error_Msg_N
- ("named association cannot follow positional association",
+ ("cannot mix named and positional associations in array aggregate",
First (Choice_List (First (Component_Associations (N)))));
return Failure;
end if;