-- there are some attributes that are significant for the body entity.
-- For example, collection of exception handlers.
- E_Protected_Object,
- -- A protected object, created by an object declaration that declares
- -- an object of a protected type.
-
E_Protected_Body,
-- A protected body. This entity serves almost no function, since all
-- semantic analysis uses the protected entity (E_Protected_Type).
E_Package_Body => ' ',
E_Protected_Body => ' ',
- E_Protected_Object => ' ',
E_Subprogram_Body => ' ',
E_Task_Body => ' ');
end if;
elsif Is_Entry (E) then
- if not Has_Completion (E) and then
- (Ekind (Scope (E)) = E_Protected_Object
- or else Ekind (Scope (E)) = E_Protected_Type)
+ if not Has_Completion (E)
+ and then Ekind (Scope (E)) = E_Protected_Type
then
Post_Error;
end if;
then
Post_Error;
- elsif Ekind (E) = E_Protected_Object
- and then not Has_Completion (Etype (E))
- then
- Post_Error;
-
elsif Ekind (E) = E_Record_Type then
if Is_Tagged_Type (E) then
Check_Abstract_Overriding (E);
return Type_Or_Variable_Has_Enabled_Property
(Item_Id => First_Subtype (Item_Id));
- -- By default, protected objects only have the properties Async_Readers
- -- and Async_Writers. If they have Part_Of components, they also inherit
- -- their properties Effective_Reads and Effective_Writes
- -- (SPARK RM 7.1.2(16)).
-
- elsif Ekind (Item_Id) = E_Protected_Object then
- return Protected_Type_Or_Variable_Has_Enabled_Property;
-
-- Otherwise a property is enabled when the related item is effectively
-- volatile.