[omniORB] Bug Or User Error?

W. Eliot Kimber eliot@isogen.com
Mon, 11 Jun 2001 17:47:00 -0500


I ran across a rather subtle failure that I assume is user error on my
part but that I think perhaps should have been caught by omniidl.

What I did was refer to a struct type defined within the scope of a
union (probably not a correct thing to do, I'm guessing) and when I
tried to import the Python module generated by omniidl, I got an import
failure because it's trying to use the name of the top-level union class
to qualify the nested struct class name within the scope of the
top-level class' definition. Doh!

Here's sample failing IDL:

module MyUnions {
  union NestedComplexUnion switch (long) {
  case 0:
    string s;
  case 1:
    sequence<NestedComplexUnion> nested;
  case 2:
    struct stuff {
      long id;
      sequence<NestedComplexUnion> nested2;
    } stuff1;
  case 3:
    struct moreStuff {
      union nestedUnion switch (long) {
      case se1_1:
	sequence<moreStuff> theList;
      case se1_2:
	string s2;
      } nestedUnion1;
    } stuff2;
  };

Note the "sequence<moreStuff>" in case 3.

Is this IDL really in error (I assume it is)? If so, should omniidl
catch this case?

Thanks,

Eliot
-- 
. . . . . . . . . . . . . . . . . . . . . . . .

W. Eliot Kimber | Lead Brain

1016 La Posada Dr. | Suite 240 | Austin TX  78752
    T 512.656.4139 |  F 512.419.1860 | eliot@isogen.com

w w w . d a t a c h a n n e l . c o m