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