Problem with enum value greater than 255
lchenut opened this issue · comments
Ludovic Chenut commented
type
RandomEnum = enum
AAA = 0
BBB = 256
RandomObject {.protobuf3.} = object
e {.fieldNumber: 1.}: RandomEnum
let o = RandomObject(e: AAA)
let oEncoded = Protobuf.encode(o)
assert(o == Protobuf.decode(oEncoded, RandomObject))
Make the compilation stopped with this message:
protobuf_serialization/numbers/varint.nim(192, 12) Error: fatal error: Tried to decode a raw binary value into an encoding with a different size. This should never happen.
Jacek Sieka commented
#36 removes enum support temporarily