diff options
Diffstat (limited to 'gcc/ada/sem_ch4.adb')
-rw-r--r-- | gcc/ada/sem_ch4.adb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index 912e09b..664a080 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -3127,7 +3127,10 @@ package body Sem_Ch4 is 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. |