===================================================================
@@ -1496,10 +1496,13 @@
-- A named association may lack an actual parameter, if it was
-- introduced for a default subprogram that turns out to be local
- -- to the outer instantiation.
+ -- to the outer instantiation. If it has a box association it must
+ -- correspond to some formal in the generic.
if Nkind (Named) /= N_Others_Choice
- and then Present (Explicit_Generic_Actual_Parameter (Named))
+ and then
+ (Present (Explicit_Generic_Actual_Parameter (Named))
+ or else Box_Present (Named))
then
Num_Actuals := Num_Actuals + 1;
end if;