Open jwillemsen opened 2 months ago
It's a weird case, but I'm not seeing something in the IDL spec that explicitly disallows this.
It's a weird case, but I'm not seeing something in the IDL spec that explicitly disallows this.
It was in IDL v3 https://www.omg.org/spec/CORBA/3.3/Interfaces/PDF, I'm not sure why IDL v4 dropped it
A union type can contain a default label only where the values given in the non-default labels do not cover the entire range of the union's discriminant type.
This? I see it in 4.2 now, it moved into the bottom of the first "Note" in the union section. Alright, so it does explicitly disallow this, assuming "range" is all the valid enum values and not just the underlying integer type.
Right, so I guess I just didn't find it in 4.2. The union discriminator is defined by the enum type, not the underlying type.
The following IDL is illegal but accepted by tao_idl, ridlc rejects it with
IDL::ParseError: 'default' case label superfluous for IDL::AST::Union UnionTypeTest