This patch fixes an obscure bug where a record aggregate would be incorrectly
flagged as illegal, when the record is inside an instance of a generic, and the
type is private.
No small test case is available.
Tested on x86_64-pc-linux-gnu, committed on trunk
2011-09-01 Bob Duff <[email protected]>
* sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
body" the same as "in inlined body", because visibility shouldn't
apply there.
Index: sem_aggr.adb
===================================================================
--- sem_aggr.adb (revision 178398)
+++ sem_aggr.adb (working copy)
@@ -1229,7 +1229,7 @@
elsif Is_Private_Type (Typ)
and then Present (Full_View (Typ))
- and then In_Inlined_Body
+ and then (In_Inlined_Body or else In_Instance_Body)
and then Is_Composite_Type (Full_View (Typ))
then
Resolve (N, Full_View (Typ));