Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / idlc / test / union.idl
blob475ad8eaf757e01c741b1472869c4236e376491e
1 /*
2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 module idlc
21 module test
24 union UnionTest switch (long) {
25 case 1: long x;
26 case 2: byte y;
27 case 3: string z;
28 case 4:
29 case 5: short w;
30 case 6: long array[ 10 ][ 20 ];
31 case 7: sequence<long> seq;
32 default: any a;
35 typedef enum E {
38 } EAlias;
40 // Union with no default label
41 union U2 switch(EAlias) {
42 case E::A : long x;
43 case E::B : short y;
46 union U3 switch(char) {
47 case 2 : long x;
48 case 4 : short y;