minor enum bug (or silent failure) in orbit1/2



Hi,

The following bug was reported by a Debian user (Jochen Voss
<jvoss2@web.de>, who I believe is part of the python/orbit team).  The
bug was originally reported against ORBit-stable, and had an obvious
workaround, so I made it low priority.  However, I've discovered that
ORBit2 has the same problem, so I thought it might be time to raise
the issue.

The original report can be found at <http://bugs.debian.org/131331>.

== testunion.idl starts at next line =================================
module TestUnion {
  interface Frosch {
    union MyUnion switch (enum E2 { A, B }) {
    case A:
      long x;
    case B: 
      string s;
    };

    attribute MyUnion U;
  };
};
== testunion.idl ends at previous line ===============================

When compiled, no definition of the enum is generated, but there is no
warning.

The workaround is fairly straightforward:

-     union MyUnion switch (enum E2 { A, B }) {
+     enum E2 { A, B };
+     union MyUnion switch (E2) {

But, while I'm not sure if the original code is legal, it seems to me
that, if it is legal, it should generate a definition for the enum,
and if it's NOT legal, there should be a warning or error message.

So, I thought I'd pass this along and see what other folks think.

cheers
-- 
Chris Waters           |  Pneumonoultra-        osis is too long
xtifr@debian.org       |  microscopicsilico-    to fit into a single
or xtifr@speakeasy.net |  volcaniconi-          standalone haiku



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]