[Ada] Fix validity checking for class-wide objects
2020-06-19 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * exp_attr.adb (Build_Record_VS_Func): Strip privacy and type derivation from the root type when 'Valid_Scalars is applied to a class-wide type.
This commit is contained in:
parent
5af0271f0e
commit
66bd7af5cc
@ -737,7 +737,7 @@ package body Exp_Attr is
|
||||
-- Use the root type when dealing with a class-wide type
|
||||
|
||||
if Is_Class_Wide_Type (Typ) then
|
||||
Typ := Root_Type (Typ);
|
||||
Typ := Validated_View (Root_Type (Typ));
|
||||
end if;
|
||||
|
||||
Typ_Decl := Declaration_Node (Typ);
|
||||
|
Loading…
x
Reference in New Issue
Block a user