Add support for int2enum
See also "**4.1.4 Support of int2enum**" **Problem statement:** The buit-in TTCN-3 predefined function int2enum is not supported (i.e. detected) by T3Q. This leads to unpredictable behaviour of the tool in the module where int2enum is placed. It can be due to errors raised in T3Q in the variables used within int2enum or simply ignoring other errors in the same module among other situations. **New requirement specification:** Support of TTCN-3 predefined function int2enum or in case it is, make sure that code behind this function is processed correctly. **Example:** Wrapper/Workaround function for int2enum currently used to skip T3Q warnings due to int2enum on module: _\\iwd-TTCN3-B2020-09_D21wk37\\MCX_IPCAN_IWD_21wk37\\MCX_IPCAN_IWD_21wk37\\MCX\\CommonIMS\\MCX_SIP_Registration.ttcn_" ```ttcn3 module int2enum_support { type enumerated IMS_PTC_DialogIndex_Type { xcapDiffDialogGMS1, xcapDiffDialogGMS2, xcapDiffDialogGMS3, xcapDiffDialogGMS4 } function FatalError(charstring p_file, integer p_line, charstring p_message) { } /* * @desc Wrapper/Workaround function for int2enum * @param p_DialogIndex * @return IMS_PTC_DialogIndex_Type */ function fl_MCX_IMS_GetNextDialogIndex (IMS_PTC_DialogIndex_Type p_DialogIndex ) return IMS_PTC_DialogIndex_Type { // !!!! int2enum seems to cause issues with T3Q !!!! //var IMS_PTC_DialogIndex_Type v_DialogIndex := p_DialogIndex; //int2enum(enum2int(v_DialogIndex) + 1, v_DialogIndex); // !!!! workaround var IMS_PTC_DialogIndex_Type v_DialogIndex ; select ( p_DialogIndex ) { case ( xcapDiffDialogGMS1 ) { v_DialogIndex := xcapDiffDialogGMS2 ; } case ( xcapDiffDialogGMS2 ) { v_DialogIndex := xcapDiffDialogGMS3 ; } case ( xcapDiffDialogGMS3 ) { v_DialogIndex := xcapDiffDialogGMS4 ; } case else { FatalError ( __FILE__ , __LINE__ , "" ) ; } } return v_DialogIndex ; } } ```
issue