tests/syntax/enumeration/enumerationvalue.txt
author mjsousa
Wed, 12 Feb 2014 17:02:08 +0000
changeset 865 7365c3e5c9ae
parent 109 3af0b849b9c6
permissions -rwxr-xr-x
Fix bug: when checking compatibility between GLOBAL and EXTERNAL variables, must only enforce GLOBAL CONSTANT => EXTERNAL CONSTANT.
Reverse CONSTANT implication is not enforced, and neither is RETAIN compatibility.



TYPE
 enum_type00 : (enum_v1, XXXX, enum_v2) := XXXX;
END_TYPE

TYPE
 enum_type01 : (XXXX, enum_v2) := XXXX;
END_TYPE

TYPE
 enum_type02 : (enum_v1, XXXX) := XXXX;
END_TYPE

TYPE
 enum_type03 : (XXXX) := XXXX;
END_TYPE




function foo : int
 var_input
  a_1, b_1: int;
 end_var
 var
  c_1, d_1: enum_type00;
(*
  enum_v1 : enum_type00;
*)
 end_var
  c_1 := enum_type00#XXXX;
  c_1 := XXXX;
  c_1 := enum_v1;
(*
  enum_v1 := enum_v1;
*)
end_function