/***************************************************
 ** @author   STF 521
 ** @version  0.0.1
 ** @purpose  1:B.1.2.1, Ensure that the IUT correctly handles template matching with all from clause
 ** @verdict  pass reject
 ***************************************************/

// The following requirements are tested:
// Restriction D,E: Individual members of the template in the all from clause shall not resolve to any of the following matching mechanisms: AnyElementsOrNone, permutation.

module NegSem_B010201_value_list_002 {

	type set of integer SoI;

	type record MessageType {
  	 integer  		field1,
  	 charstring  	field2
	}
    template SoI m_SoI := {1,*,4};
    template integer mw_SoI := (all from m_SoI);    //error: m_SoI contains AnyElementsOrNone

    type port loopbackPort message {
	  inout integer
	}


type component GeneralComp {
	  port loopbackPort messagePort
}

testcase TC_NegSem_B010201_value_list_002() runs on GeneralComp {

    var integer v_testMessage;
     v_testMessage:= 2;

 messagePort.send(v_testMessage);

    alt {
     [] messagePort.receive(mw_SoI) {
        setverdict(pass);
     }
     [] messagePort.receive {
        setverdict(fail);
     }
    }
}

control{
    execute(TC_NegSem_B010201_value_list_002());
}

}
