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:6.2.5.1, unknown union alternative in extended type reference
13 ** @verdict pass reject
14 ***************************************************/
16 // The following requirement is tested:
17 // Alternatives of a union type shall be referenced by the dot notation
18 // TypeIdOrExpression.AlternativeId, where TypeIdOrExpression resolves to the name
19 // of a union type or an expression of a union type such as variable, formal
20 // parameter, module parameter, constant, template, or function invocation.
21 // AlternativeId shall resolve to the name of an alternative in the union type.
23 module NegSem_06020501_referencing_fields_of_union_type_002 {
24 type component GeneralComp {
32 type U.option3 UnionItem;
34 testcase TC_NegSem_06020501_referencing_fields_of_union_type_002() runs on GeneralComp {
35 var UnionItem v_val := 1;
36 if (v_val == 1) { setverdict(pass); }
37 else { setverdict(fail); }
41 execute(TC_NegSem_06020501_referencing_fields_of_union_type_002());