1 /******************************************************************************
2 * Copyright (c) 2000-2016 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * Adrien Kirjak – initial implementation
12 ** @purpose 1:5.4.2, verify that referencing errors are detected in actual parameters passed to out formal template parameters
13 ** @verdict pass reject
14 ***************************************************/
16 // The following requirement is tested:
17 // When actual parameters that are passed to inout and out formal value or template
18 // parameters contain a value or template reference, rules for using references on
19 // the left hand side of assignments apply.
21 module NegSem_050402_actual_parameters_095 {
23 type component GeneralComp {
34 function f_test(out template integer p_val) {
38 testcase TC_NegSem_050402_actual_parameters_095() runs on GeneralComp {
39 var template R v_rec := {
41 field2 := ({ subfield1 := 0, subfield2 := 1}, { subfield1 := 2, subfield2 := 3 })
43 f_test(v_rec.field2.subfield1); // tested parameter passing (using referencing rules specified at 15.6.2)
44 if (valueof(v_rec.field2.subfield1) == 10 and match(0, v_rec.field2.subfield2)) { setverdict(pass); }
45 else { setverdict(fail); }
50 execute(TC_NegSem_050402_actual_parameters_095());