/*****************************************************************
 ** @author   STF 572
 ** @version  0.0.1
 ** @purpose  1:22.3.4, Verify that error occurs when .getreply operation is used on non port type
 ** @verdict  pass reject
 *****************************************************************/
// The following requirements are tested:
// Restriction l) The ObjectReference shall be of a port type.

module NegSem_220304_getreply_operation_023 {

	signature S();

	type port P procedure {
		inout S;
	}

    type component GeneralComp
	{
		port P p;
        var anytype p2;
	}

	function f() runs on GeneralComp
	{
		p.getcall(S:?);
		p2.reply(S:{});    // error: non port type
	}

    testcase TC_NegSem_220304_getreply_operation_023() runs on GeneralComp system GeneralComp {
        var GeneralComp v_ptc := GeneralComp.create;
		var integer v_index;
		connect(self:p, v_ptc:p);
		p.call(S:{}, nowait);
		v_ptc.start(f());
		v_ptc.done;
		setverdict(pass);

    }

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