Details
-
Bug
-
Status: In Review
-
Medium
-
Resolution: Unresolved
-
None
Description
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.
Attachments
Gerrit Reviews
| # | Subject | Branch | Project | Status | CR | V |
|---|---|---|---|---|---|---|
| 101848,19 | Fix generation of constructor parameters for BitsTypeObject | master | mdsal | Status: NEW | -1 | -1 |