===================================================================
@@ -8378,8 +8378,11 @@
T := It.Typ;
end if;
- if Is_Record_Type (T) then
+ -- Locate selected component. For a private prefix the selector
+ -- can denote a discriminant.
+ if Is_Record_Type (T) or else Is_Private_Type (T) then
+
-- The visible components of a class-wide type are those of
-- the root type.
===================================================================
@@ -3127,8 +3127,11 @@
T := It.Typ;
end if;
- if Is_Record_Type (T) then
+ -- Locate the component. For a private prefix the selector can denote
+ -- a discriminant.
+ if Is_Record_Type (T) or else Is_Private_Type (T) then
+
-- If the prefix is a class-wide type, the visible components are
-- those of the base type.