1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
enum FooDisc { FOO1, FOO2 }; union Foo switch (FooDisc) { case FOO1: long x; case FOO2: string y; default: char z; }; struct Bar { enum BarDisc { BAR1, BAR2 } kind; union Foo switch (BarDisc) { case BAR1: long x; case BAR2: long y; } addr; };