flatbuffers
flatbuffers copied to clipboard
Generated duplicit associated value for enum variant
For enums where you define values for some variants can flatc generate same value for multiple variants.
Simple example:
enum Color : byte { Red = 4, Green = 3, Blue }
In this case is Red = 4 and flatc generate Blue=4. Then if you serialize Color:Blue and then deserialize back you get Color:Red.
It should generate next available value, not only next value from previous as it is write now. Or at least some error/warning during compilation of fbs schema.