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