/*****************************************************************
 ** @author   STF 572
 ** @version  0.0.1
 ** @purpose  1:22.3.1, verify tha in getcall the ObjectReference shall be of a port type.
 ** @verdict  pass reject
 *****************************************************************/

// The following requirements are tested:
// Restriction n) the ObjectReference shall be of a port type.

module NegSem_220302_getcall_operation_020 {

	signature S();

    type port P procedure {
		inout S;
	}

    type component GeneralComp {
		var anytype p;
	}

    function f() runs on GeneralComp
	{
        alt
		{
        	[] any from p.getcall { // error: not port type

             }
			[else] { setverdict(pass); }
		}
	}


    testcase TC_NegSem_220302_getcall_operation_020() runs on GeneralComp system GeneralComp {
        var GeneralComp v_ptc := GeneralComp.create;
		v_ptc.start(f());
		v_ptc.done;
    }

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