-
Bug
-
Resolution: Unresolved
-
Medium
-
None
Constructor parameters for BitsTypeObject are generated in the wrong order. Correct order has to be based on the position of individual bits.
For this typedef:
typedef my-bits { type bits { bit bit-zero { position 0; } bit bit-one { position 1; } bit bit-two { position 2; } } default "bit-one"; }
We end up emitting:
public class MyBits implements BitsTypeObject, Serializable { private static final long serialVersionUID = -6378126414559401958L; private final Boolean _bitZero; private final Boolean _bitOne; private final Boolean _bitTwo; public MyBits(Boolean _bitOne, Boolean _bitTwo, Boolean _bitZero) { this._bitZero = _bitZero; this._bitOne = _bitOne; this._bitTwo = _bitTwo; } }
Apart from some kind of illogical arrangement, it causes the wrong assignment of arguments through super(), in the case of restricted bit types.