/***************************************************
 ** @author   STF 572
 ** @version  0.0.1
 ** @purpose  1:6.2, Ensure that mixed list and assignment notation index shall not appear more than once
 ** @verdict  pass reject
 ***************************************************/

// The following requirement is tested:
 /*
  * In these notations this notation each assigned field or index shall not appear more
  * than once and assignments to fields or indexes given in list notation are not allowed.
  * */

module NegSem_0602_TopLevel_005 {

    type record MyRecordType{
        integer field1,
        integer field2,
        integer field3
    }
        type component GeneralComp {
    }

testcase TC_NegSem_0602_TopLevel_005() runs on GeneralComp {

      var MyRecordType v_r := {1, 2, field1 := 3    // error, field1 is already given
      };

     if ( match(v_r, {1,2,3})) {
            setverdict(pass);
        }
    else{
        setverdict(fail);
    }
}
    control {
        execute(TC_NegSem_0602_TopLevel_005());
    }
}