[omniORB] IDL name clashes

Richard Gruet rgruet@ina.fr
Wed, 06 Sep 2000 11:14:02 +0100


Thank you Craig & Duncan, this is a definitive answer :-)

Cheers,

Richard

Duncan Grisby wrote:

> On Tuesday 5 September, Richard Gruet wrote:
>
> > module m {
> >     interface M {
> > };
> > };
> >
> > I get an omniidl error 'Declaration of interface 'M' clashes with name
> > of enclosing scope 'm'.
>
> omniidl is right. Section 3.15.2 of the 2.3 spec says
>
>   "The name of an interface, value type, struct, union, exception or a
>    module may not be redefined within the immediate scope of the
>    interface, value type, struct, union, exception, or the module. For
>    example:
>
>      module M {
>        typedef short M; // Error
>        interface I {
>          void i(in short j); // Error: i clashes with the interface
>                              // name I
>        };
>      };
>   "
>
> Cheers,
>
> Duncan.
>
> --
>  -- Duncan Grisby  \  Research Engineer  --
>   -- AT&T Laboratories Cambridge          --
>    -- http://www.uk.research.att.com/~dpg1 --