-- List is currently incomplete ???
Operational_Aspect : constant array (Aspect_Id) of Boolean :=
- (Aspect_Constant_Indexing => True,
+ (Aspect_Aggregate => True,
+ Aspect_Constant_Indexing => True,
Aspect_Default_Iterator => True,
Aspect_Iterator_Element => True,
Aspect_Iterable => True,
Aspect_Variable_Indexing => True,
- Aspect_Aggregate => True,
others => False);
-- The following array indicates aspects for which multiple occurrences of
Validate_Storage_Model_Type_Aspect (E, ASN);
when Aspect_Aggregate =>
- null;
+ if Is_Array_Type (E) then
+ Error_Msg_N
+ ("aspect Aggregate may not be applied to array type",
+ ASN);
+ end if;
when others =>
null;
Next_Rep_Item (ASN);
end loop;
- -- Make a second pass for a Full_Access_Only entry
+ -- Make a second pass for a Full_Access_Only entry, see above why
ASN := First_Rep_Item (E);
while Present (ASN) loop
end if;
when Aspect_Aggregate =>
- -- We will be checking that the aspect is not specified on a
- -- non-array type in Check_Aspect_At_Freeze_Point
+ -- We will be checking that the aspect is not specified on
+ -- an array type in Analyze_Aspects_At_Freeze_Point.
Validate_Aspect_Aggregate (Expr);
return;
when Aspect_Aggregate =>
- if Is_Array_Type (Entity (ASN)) then
- Error_Msg_N
- ("aspect& can only be applied to non-array type",
- Ident);
- end if;
Resolve_Aspect_Aggregate (Entity (ASN), Expression (ASN));
return;
-- Quite an awkward approach, but this is an awkard requirement
procedure Analyze_Aspects_At_Freeze_Point (E : Entity_Id);
- -- Analyzes all the delayed aspects for entity E at freezing point. This
- -- includes dealing with inheriting delayed aspects from the parent type
- -- in the case where a derived type is frozen. Callers should check that
- -- Has_Delayed_Aspects (E) is True before calling this routine.
+ -- Analyzes all the delayed aspects for entity E at the freeze point. Note
+ -- that this does not include dealing with inheriting delayed aspects from
+ -- the parent or base type in the case where a derived type or a subtype is
+ -- frozen. Callers should check that Has_Delayed_Aspects (E) is True before
+ -- calling this routine.
procedure Check_Aspects_At_End_Of_Declarations (E : Entity_Id);
-- Performs the processing described above at the freeze all point, and