xref: /aoo41x/main/idlc/test/union.idl (revision cdf0e10c)
1module idlc
2{
3module test
4{
5
6union UnionTest switch (long) {
7  case 1: long x;
8  case 2: byte y;
9  case 3: string z;
10  case 4:
11  case 5: short w;
12  case 6: long array[ 10 ][ 20 ];
13  case 7: sequence<long> seq;
14 default: any a;
15};
16
17typedef enum E {
18  A,
19  B
20} EAlias;
21
22// Union with no default label
23union U2 switch(EAlias) {
24  case E::A : long x;
25  case E::B : short y;
26};
27
28union U3 switch(char) {
29  case 2 : long x;
30  case 4 : short y;
31};
32
33};
34};
35
36