In an instance, errors that report that an aggregate (sub)component is limited must be ignaored because they originate in view conflicts. If the original aggregate is legal and the actuals are legal, the aggregate in the instance itself is legal.
No simple example available. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-31 Ed Schonberg <schonb...@adacore.com> * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate subcomponents tnat may be limited, because they originate in view conflicts. If the original aggregate is legal and the actuals are legal, the aggregate itself is legal.
Index: sem_aggr.adb =================================================================== --- sem_aggr.adb (revision 178358) +++ sem_aggr.adb (working copy) @@ -1052,8 +1052,14 @@ end if; -- Ada 2005 (AI-287): Limited aggregates allowed + -- In an instance, ignore aggregate subcomponents tnat may be limited, + -- because they originate in view conflicts. If the original aggregate + -- is legal and the actuals are legal, the aggregate itself is legal. - if Is_Limited_Type (Typ) and then Ada_Version < Ada_2005 then + if Is_Limited_Type (Typ) + and then Ada_Version < Ada_2005 + and then not In_Instance + then Error_Msg_N ("aggregate type cannot be limited", N); Explain_Limited_Type (Typ, N);