ada: Put back conversion to interface in more cases
This needs to be done for all expressions with class-wide type. gcc/ada/ * exp_ch3.adb (Make_Allocator_For_Return): Put back an interface conversion for expressions with non-interface class-wide type.
This commit is contained in:
parent
24993939b7
commit
e59cd0db82
1 changed files with 1 additions and 1 deletions
|
@ -7185,7 +7185,7 @@ package body Exp_Ch3 is
|
|||
-- remove earlier in the processing.
|
||||
|
||||
if Is_Interface (Typ)
|
||||
and then Is_Interface (Etype (Alloc_Expr))
|
||||
and then Is_Class_Wide_Type (Etype (Alloc_Expr))
|
||||
and then Typ /= Etype (Alloc_Expr)
|
||||
then
|
||||
Alloc_Expr := Convert_To (Typ, Alloc_Expr);
|
||||
|
|
Loading…
Add table
Reference in a new issue