/***************************************************
 ** @author   STF 487
 ** @version  0.0.1
 ** @purpose  1:5.4.2, verify that incompatible values cannot be passed to inout formal parameters
 ** @verdict  pass reject
 ***************************************************/

// The following requirement is tested:
// Strong typing is required for parameters passed by reference.

module NegSem_050402_actual_parameters_109 {

    type component GeneralComp {
	}

    type record R1 {
        integer field1,
        integer field2 optional
    }

    type record R2 {
        integer elem1,
        integer elem2
    }

    function f_test (inout R1 p_val) {
        if (p_val == { field1 := 1, field2 := 2 }) { setverdict(pass); }
        else { setverdict(fail); }
    }

    testcase TC_NegSem_050402_actual_parameters_109() runs on GeneralComp {
        var R2 v_rec := { 1, 2 };
        f_test(v_rec);
	}

	control {
		execute(TC_NegSem_050402_actual_parameters_109());
	}
}
