Titan Core Initial Contribution
[deliverable/titan.core.git] / function_test / Semantic_Analyser / xer / usenil_no_optional_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 usenil_no_optional_SE { //^In TTCN-3 module `usenil_no_optional_SE'://
9 /*
10 33.2.1 The USE-NIL encoding instruction shall only be assigned to a sequence type that has an OPTIONAL
11 component without a final ATTRIBUTE encoding instruction...
12 */
13
14 type record UN0 { //^In type definition// \
15 //^error: The target of an USE-NIL must have at least one component//
16 // empty record
17 }
18 with {
19 variant "useNil";
20 }
21
22 type record UN { //^In type definition//
23 integer i,
24 boolean b,
25 charstring last //^error: Last component of USE-NIL must be OPTIONAL//
26 }
27 with {
28 variant "useNil";
29 }
30
31 type record UN2 { //^In type definition//
32 integer i,
33 boolean b,
34 charstring last //^error: Last component of USE-NIL must not have ATTRIBUTE//
35 }
36 with {
37 variant "useNil";
38 variant (i, b, last) "attribute"
39 }
40
41 }
42 with {
43 encode "XML";
44 variant "controlNamespace 'urn:a' prefix 'u'"
45 }
This page took 0.079458 seconds and 6 git commands to generate.