Closed geohuz closed 3 years ago
It can be caused by change in https://github.com/nim-lang/Nim/issues/14001, the following change as suggested:
proc toJson*[Enum: enum](value: Enum): JsonNode =
for v in Enum.low.int..Enum.high.int:
if ord(value) == v:
return %($v)
# The enum has a value that is not defined in the enum type
result = %(cast[int](value))
with the proto spec:
The compiler generate the following errors: