-
Bug
-
Resolution: Fixed
-
P3
-
1.3.0
-
merlin
-
sparc
-
solaris_7
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2029950 | 1.4.0 | Ken Cavanaugh | P3 | Closed | Won't Fix |
If a Discriminated union is defined with an unsigned discriminator, the java code generated by idlj compiler can not be compiled.
Try compiling the following idl code.
*******************
union FixedUnion switch(unsigned short)
{
case 0: short s;
case 1: long l;
default: boolean b;
};
*******************
javac gives the following error.
FixedUnion.java:80: Incompatible type for =. Can't convert null to short.
__discriminator = null;
^
1 error
Work around this problem is to remove unsigned from the union declaration.
Try compiling the following idl code.
*******************
union FixedUnion switch(unsigned short)
{
case 0: short s;
case 1: long l;
default: boolean b;
};
*******************
javac gives the following error.
FixedUnion.java:80: Incompatible type for =. Can't convert null to short.
__discriminator = null;
^
1 error
Work around this problem is to remove unsigned from the union declaration.
- backported by
-
JDK-2029950 Generated Java code for Discriminated Union doesn't compile
-
- Closed
-