[Ada] Improve error message on array aggregates
authorYannick Moy <moy@adacore.com>
Thu, 16 Sep 2021 14:51:15 +0000 (16:51 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 5 Oct 2021 08:20:03 +0000 (08:20 +0000)
gcc/ada/

* sem_aggr.adb (Resolve_Array_Aggregate): Improve error message.

gcc/ada/sem_aggr.adb

index 3283fbb..9ae5ff6 100644 (file)
@@ -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;