+2018-04-04 Piotr Trojanek <trojanek@adacore.com>
+
+ * sem_eval.adb (Is_Null_Range): Clarify access to the full view of a
+ type.
+ (Not_Null_Range): Same as above.
+
2018-04-04 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb: Minor reformatting.
and then Compile_Time_Known_Value (Hi)
then
declare
- Typ : Entity_Id := Etype (Lo);
- Full_Typ : constant Entity_Id := Full_View (Typ);
+ Typ : Entity_Id := Etype (Lo);
begin
-- When called from the frontend, as part of the analysis of
-- potentially static expressions, Typ will be the full view of a
-- is null, Typ might be a private type and we need to explicitly
-- switch to its corresponding full view to access the same info.
- if Present (Full_Typ) then
- Typ := Full_Typ;
+ if Is_Incomplete_Or_Private_Type (Typ)
+ and then Present (Full_View (Typ))
+ then
+ Typ := Full_View (Typ);
end if;
if Is_Discrete_Type (Typ) then
and then Compile_Time_Known_Value (Hi)
then
declare
- Typ : Entity_Id := Etype (Lo);
- Full_Typ : constant Entity_Id := Full_View (Typ);
+ Typ : Entity_Id := Etype (Lo);
begin
-- When called from the frontend, as part of the analysis of
-- potentially static expressions, Typ will be the full view of a
-- is null, Typ might be a private type and we need to explicitly
-- switch to its corresponding full view to access the same info.
- if Present (Full_Typ) then
- Typ := Full_Typ;
+ if Is_Incomplete_Or_Private_Type (Typ)
+ and then Present (Full_View (Typ))
+ then
+ Typ := Full_View (Typ);
end if;
if Is_Discrete_Type (Typ) then