+2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * sem_prag.adb (Has_Visible_State): Do not consider constants as
+ visible state because it is not possible to determine whether a
+ constant depends on variable input.
+ (Propagate_Part_Of): Add comment clarifying the behavior with respect
+ to constant.
+
2018-07-17 Yannick Moy <moy@adacore.com>
* gnat1drv.adb (Gnat1drv): Do not issue warning about exception not
-- The Part_Of indicator turns an abstract state or an
-- object into a constituent of the encapsulating state.
+ -- Note that constants are considered here even though
+ -- they may not depend on variable input. This check is
+ -- left to the SPARK prover.
elsif Ekind_In (Item_Id, E_Abstract_State,
E_Constant,
elsif Is_Hidden (Item_Id) then
null;
- -- A visible state has been found
+ -- A visible state has been found. Note that constants are not
+ -- considered here because it is not possible to determine whether
+ -- they depend on variable input. This check is left to the SPARK
+ -- prover.
- elsif Ekind_In (Item_Id, E_Abstract_State,
- E_Constant,
- E_Variable)
- then
+ elsif Ekind_In (Item_Id, E_Abstract_State, E_Variable) then
return True;
-- Recursively peek into nested packages and instantiations