/***************************************************
 ** @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_006 {

    type set MySetType{
        integer field1,
        integer field2,
        integer field3
    }
        type component GeneralComp {
    }

testcase TC_NegSem_0602_TopLevel_006() runs on GeneralComp {

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

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