/***************************************************
 ** @author   STF 572
 ** @version  0.0.1
 ** @purpose  1:22.2.2, Ensure that the referenced value associated with ValueRef or the return type associated with FunctionInstance followed
by the receive keyword, shall be of a port type.
 ** @verdict  pass reject
 ***************************************************/

// The following requirements are tested:
/* Restriction n) The referenced value associated with ValueRef or the return type associated with FunctionInstance followed
 * by the receive keyword, shall be of a port type.
 * */

module NegSem_220202_ReceiveOperation_025 {


    type port loopbackPort message {
	  inout integer
	}

    type anytype anyType;


type component GeneralComp {
	  port loopbackPort messagePort
}

testcase TC_NegSem_220202_ReceiveOperation_025() runs on GeneralComp {

    var anyType nonMessagePort;
     messagePort.send(2);

    alt {
     [] nonMessagePort.receive(1) {   // error: shall be of a port type.
         setverdict(pass);
     }

    }
}

control{
     execute(TC_NegSem_220202_ReceiveOperation_025());
}

}
