[omniORB] enums

Sai-Lai Lo S.Lo@orl.co.uk
Thu, 30 Apr 1998 19:14:24 +0100


>>>>> Dominic Chorafakis XE41 ext 9049 writes:

> Another enum question...

> When I do the following:

> module A
> {
>   enum X {x1, x2, x3};

>   enum Y {x1,y2,y3};
> };

> the IDL compiler gives the following error:

> line 5: redefinition after use, ::A::x1, ::A,
> ::A::x1

> which is because of the use of identifier x1 in
> both enum definitions.  Is this a compiler bug or does IDL not allow it ?

This is not allowed because enum values are defined in the same scope as
the enum type. You have duplicate identifier A::x1.