[omniORB] IDL name clashes

Duncan Grisby dgrisby@uk.research.att.com
Wed, 06 Sep 2000 09:41:54 +0100


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 --