/***************************************************
 ** @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:
//The type of the template list and the member type of the template in the all from clause shall be compatible.
// Restriction B

module NegSem_B010201_value_list_001 {

	type set of integer SoI;

	type record MessageType {
  	 integer  		field1,
  	 charstring  	field2
	}
    template SoI m_SoI := {1,2,3,4};
    template float mw_SoI := (all from m_SoI);    //error: m_SoI is integer, mw_SoI is float

    type port loopbackPort message {
	  inout float
	}


type component GeneralComp {
	  port loopbackPort messagePort
}

testcase TC_NegSem_B010201_value_list_001() runs on GeneralComp {

    var float v_testMessage;
     v_testMessage:= 2.0;

 messagePort.send(v_testMessage);

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

control{
    execute(TC_NegSem_B010201_value_list_001());
}

}
