-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2018, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
begin
return In_Same_List (Parent (Typ), Op_Decl)
or else
- (Ekind_In (Scop, E_Package, E_Generic_Package)
+ (Is_Package_Or_Generic_Package (Scop)
and then List_Containing (Op_Decl) =
Visible_Declarations (Parent (Scop))
and then List_Containing (Parent (Typ)) =
-- ration "type P is access Integer" and an anonymous access to Integer,
-- P is convertible to "access Integer" by 4.6 (24.11-24.15), but there
-- is no rule in 4.6 that allows "access Integer" to be converted to P.
+ -- Note that this does not preclude one operand to be a pool-specific
+ -- access type, as a previous version of this code enforced.
elsif Ada_Version >= Ada_2005
and then Ekind_In (Etype (L), E_Anonymous_Access_Type,
E_Anonymous_Access_Subprogram_Type)
and then Is_Access_Type (Etype (R))
- and then Ekind (Etype (R)) /= E_Access_Type
then
return Etype (L);
and then Ekind_In (Etype (R), E_Anonymous_Access_Type,
E_Anonymous_Access_Subprogram_Type)
and then Is_Access_Type (Etype (L))
- and then Ekind (Etype (L)) /= E_Access_Type
then
return Etype (R);
return False;
else
- return In_Generic_Actual (Parent (Par));
+ return In_Generic_Actual (Par);
end if;
end In_Generic_Actual;
Print_Node_Briefly (N);
if not Is_Overloaded (N) then
- Write_Line ("Non-overloaded entity ");
- Write_Entity_Info (Entity (N), " ");
+ if Is_Entity_Name (N) then
+ Write_Line ("Non-overloaded entity ");
+ Write_Entity_Info (Entity (N), " ");
+ end if;
elsif Nkind (N) not in N_Has_Entity then
Get_First_Interp (N, I, It);