zserio
zserio copied to clipboard
Duplicated offsets should be disabled
Zserio version and language Zserio: 2.14.0 Language: N/A
Describe the bug Duplicated offsets should be disabled because schema with duplicated offsets cannot be read correctly.
How to reproduce Consider the following schema:
struct Data
{
uint32 offset;
bool dummy1;
offset:
uint64 someValue;
bool dummy2;
offset:
uint32 anotherValue;
};
Such schema compiles without any problem even if it is completely unusable because the first offset will be overwritten by the second one during writing resulting in read error because of the wrong offset.
Expected behavior Zserio compiler should clearly detect such problem and report compilation error.
Additional context Please, this issue should be solvable for all use cases as soon issues #640 and #641 will be solved.