Merge github.com:eclipse/titan.core
[deliverable/titan.core.git] / function_test / Semantic_Analyser / xer / untag2_SE.ttcn
CommitLineData
114d1c9a 1/******************************************************************************
d44e3c4f 2 * Copyright (c) 2000-2016 Ericsson Telecom AB
114d1c9a
EL
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
d44e3c4f 7 *
8 * Contributors:
9 * Balasko, Jeno
10 * Raduly, Csaba
11 *
114d1c9a
EL
12 ******************************************************************************/
13module untag2 { //^In TTCN-3 module `untag2'://
14
15type record u2 { //^In type definition//
16 integer i, //^Due to this UNTAGGED component//
17 charstring s, //^error: More than one UNTAGGED character-encodable field// \
18 //^error: All the other components should be ATTRIBUTE or ANY-ATTRIBUTE//
19 universal charstring u //^error: More than one UNTAGGED character-encodable field//
20}
21with {
22 variant (i, s, u) "untagged"
23}
24
25
26type record u3 {
27 record of integer f1,
28 record of integer f2
29}
30with {
31 variant (f1,f2) "untagged"; // this can not be decoded! TODO: add diagnostic
32}
33
34type record u4 {
35 record {} f1
36}
37with {
38 // untagged + "name as" is rather redundant,
39 // but the compiler doesn't report it
40 variant (f1) "untagged"
41 variant (f1) "name as 'f2'"
42}
43
44}
45with {
46 encode "XML";
47}
This page took 0.03511 seconds and 5 git commands to generate.