/*****************************************************************
 ** @author   STF 572
 ** @version  0.0.1
 ** @purpose  1:21.3.10, calling a function on an incompatible component
 ** @verdict  pass reject
 *****************************************************************/

// The following requirements are tested:
// The function or altstep invoked in a call test component operation shall have a runs on definition
// referencing a component type to which the called component is compatible (see clause 6.3.3).

module NegSem_210310_call_test_component_operation_005 {

    type component GeneralComp {}
	type component OtherComp {
	   var integer vc_int;
	}

	function f() runs on OtherComp {
		setverdict(pass);
	}

    testcase TC_NegSem_210310_call_test_component_operation_005() runs on GeneralComp system GeneralComp {
        var GeneralComp v_ptc := GeneralComp.create;
        v_ptc.call(f());
        setverdict(pass);
    }

    control {
        execute(TC_NegSem_210310_call_test_component_operation_005(), 5.0);
    }
}