function Is_Subtype_Declaration return Boolean;
-- The replacement of a discriminant reference by its value is required
- -- if this is part of the initialization of an temporary generated by
- -- a change of representation. This shows up as the construction of a
+ -- if this is part of the initialization of an temporary generated by a
+ -- change of representation. This shows up as the construction of a
-- discriminant constraint for a subtype declared at the same point as
- -- the entity in the prefix of the selected component.
- -- We recognize this case when the context of the reference is:
- --
- -- subtype ST is T(Obj.D);
- --
- -- The entity for Obj comes from source, and ST has the same sloc.
+ -- the entity in the prefix of the selected component. We recognize this
+ -- case when the context of the reference is:
+ -- subtype ST is T(Obj.D);
+ -- where the entity for Obj comes from source, and ST has the same sloc.
-----------------------
-- In_Left_Hand_Side --
function Is_Subtype_Declaration return Boolean is
Par : constant Node_Id := Parent (N);
-
begin
return
Nkind (Par) = N_Index_Or_Discriminant_Constraint
if Disc = Entity (Selector_Name (N))
and then (Is_Entity_Name (Dval)
- or else Nkind (Dval) = N_Integer_Literal
- or else Is_Subtype_Declaration
- or else Is_Static_Expression (Dval))
+ or else Nkind (Dval) = N_Integer_Literal
+ or else Is_Subtype_Declaration
+ or else Is_Static_Expression (Dval))
then
-- Here we have the matching discriminant. Check for
-- the case of a discriminant of a component that is