diff --git a/compiler2/Value.cc b/compiler2/Value.cc index 4b01c2b9e9667d6510d7447d8f46f625cbdbcfba..e99ca481e4c43d04eec36fa85cbeae24b0920fe3 100644 --- a/compiler2/Value.cc +++ b/compiler2/Value.cc @@ -630,7 +630,7 @@ namespace Common { break; case OPTYPE_CHECKSTATE_ANY: // [r1] v2: port or any case OPTYPE_CHECKSTATE_ALL: // [r1] v2: port or all - u.expr.v2->chk_expr_immutability(); + warning("State of port(s) may change during the actual snapshot."); break; case OPTYPE_HOSTID: // [v1] if (u.expr.v1) u.expr.v1->chk_expr_immutability(); diff --git a/function_test/Semantic_Analyser/TTCN3_SA_9_TD.script b/function_test/Semantic_Analyser/TTCN3_SA_9_TD.script index 0fd001eb0825fa694f1cb4196a9ff728fdcf4789..0471e9c122601e5751f8e3b598c1e8415af27e1c 100644 --- a/function_test/Semantic_Analyser/TTCN3_SA_9_TD.script +++ b/function_test/Semantic_Analyser/TTCN3_SA_9_TD.script @@ -1333,16 +1333,16 @@ module M { testcase T() runs on C { timer t := 5.0; t.start; alt { - [(p.checkstate("Connected"))] t.timeout {} // OK? - [(any port.checkstate("Connected"))] t.timeout {} // OK? + [(p.checkstate("Connected"))] t.timeout {} // NOT OK + [(any port.checkstate("Connected"))] t.timeout {} // NOT OK [(p.checkstate(FS()))] t.timeout {} // NOT OK [(any port.checkstate(FS()))] t.timeout {} // NOT OK } } } <END_MODULE> -<RESULT IF_FAIL COUNT 2> -(?im)\bwarning\b.+?\bFunction invocation\b.+?\bmay change the actual snapshot\b +<RESULT IF_FAIL COUNT 4> +(?im)\bwarning\b.+?\bstate of port\b.+?\bmay change during the actual snapshot\b <END_RESULT> <END_TC> :exmp. diff --git a/function_test/Semantic_Analyser/invoking_function_from_specific_places/InvokingFunctionFromSpecificPlaces_SW.ttcn b/function_test/Semantic_Analyser/invoking_function_from_specific_places/InvokingFunctionFromSpecificPlaces_SW.ttcn index e12cad11c051270e2f33805db26903baf45a1a7b..e593aea9d72716ac7063f396e39f5edaffac1660 100644 --- a/function_test/Semantic_Analyser/invoking_function_from_specific_places/InvokingFunctionFromSpecificPlaces_SW.ttcn +++ b/function_test/Semantic_Analyser/invoking_function_from_specific_places/InvokingFunctionFromSpecificPlaces_SW.ttcn @@ -149,10 +149,10 @@ module InvokingFunctionFromSpecificPlaces_SW { //^In TTCN-3 module// [t.running] t.timeout {} //^In guard expression// //^warning\: State of timer// /* OPTYPE_CHECKSTATE_ANY */ - [(any port.checkstate("Connected"))] t.timeout {} - [(any port.checkstate(fs()))] t.timeout {} //^In guard expression// //^warning\: Function invocation// + [(any port.checkstate("Connected"))] t.timeout {} //^In guard expression// //^warning\: State of port// + [(any port.checkstate(fs()))] t.timeout {} //^In guard expression// //^warning\: State of port// /* OPTYPE_CHECKSTATE_ALL */ - [(all port.checkstate(fs()))] t.timeout {} //^In guard expression// //^warning\: Function invocation// + [(all port.checkstate(fs()))] t.timeout {} //^In guard expression// //^warning\: State of port// /* OPTYPE_HOSTID */ [hostid() == ""] t.timeout {}