-- If this component is private (or depends on a private type), flag the
-- record type to indicate that some operations are not available.
- P := Private_Component (T);
+ P := Partially_Visible_Subcomponent (T);
if Present (P) then
end if;
end if;
- Priv := Private_Component (Element_Type);
+ Priv := Partially_Visible_Subcomponent (Element_Type);
if Present (Priv) then
if Is_Type (Id)
and then (Is_Limited_Composite (Id)
or else Is_Private_Composite (Id))
- and then No (Private_Component (Id))
+ and then No (Partially_Visible_Subcomponent (Id))
then
Set_Is_Limited_Composite (Id, False);
Set_Is_Private_Composite (Id, False);
end if;
end Predicate_Tests_On_Arguments;
- -----------------------
- -- Private_Component --
- -----------------------
+ ------------------------------------
+ -- Partially_Visible_Subcomponent --
+ ------------------------------------
- function Private_Component (Type_Id : Entity_Id) return Entity_Id is
+ function Partially_Visible_Subcomponent
+ (Type_Id : Entity_Id) return Entity_Id
+ is
Ancestor : constant Entity_Id := Base_Type (Type_Id);
function Trace_Components
begin
return Trace_Components (Type_Id, False);
- end Private_Component;
+ end Partially_Visible_Subcomponent;
---------------------------
-- Primitive_Names_Match --
-- with a special name to avoid being overridden (i.e. return true in case
-- of entities with names "nameP" and "name" or vice versa).
- function Private_Component (Type_Id : Entity_Id) return Entity_Id;
- -- Returns some private component (if any) of the given Type_Id.
- -- Used to enforce the rules on visibility of operations on composite
- -- types, that depend on the full view of the component type. For a
- -- record type there may be several such components, we just return
- -- the first one.
+ function Partially_Visible_Subcomponent
+ (Type_Id : Entity_Id) return Entity_Id;
+ -- If there exist any subcomponents of Type_Id whose types are currently
+ -- only partially visible, returns one such subcomponent. Otherwise returns
+ -- Empty. Used to enforce the rules on visibility of operations on
+ -- composite types, that depend on the full view of the subcomponent types.
+ --
+ -- We say that a type is "partially visible" when it has a partial view
+ -- that is currently visible but no full view that is currently visible.
procedure Process_End_Label
(N : Node_Id;