/*****************************************************************
 ** @author   STF 548
 ** @version  0.0.1
 ** @purpose  1:27.1.2.0, Verify that @local attribute is not applied to lower scopes
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

// The following requirement is tested:
// Attributes with the @local modifier override attributes from higher scope, but they are valid for the associated
// language element only. They do not affect definitions inside the associated language element as the @local
// attribute is completely transparent to lower scopes.

module Sem_27010200_general_010 {

    type component GeneralComp {
	}

	type record R {
		integer field1,
		integer field2
	} with { encode @local "Rule1" }

	type record of universal charstring RoUC;

	testcase TC_Sem_27010200_general_010 () runs on GeneralComp {
		var RoUC v_enc1 := R.encode,
			v_enc2 := R.field1.encode,
			v_enc3 := R.field2.encode;
		if(lengthof(v_enc1) == 1 and v_enc1[0] == "Rule1" and
		   lengthof(v_enc2) == 0 and
		   lengthof(v_enc3) == 0) {
			setverdict(pass);
		} else {
			setverdict(fail);
		}
	}

	control {
		execute(TC_Sem_27010200_general_010());
	}

}