You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/Users/geohuz/Coding/nimlearn/deepstream.io-protobuf/proto_files/general_pb.nim(120, 33) template/generic instantiation of `toJson` from here
/Users/geohuz/.nimble/pkgs/nimpb-0.2.0/nimpb/json.nim(42, 18) template/generic instantiation of `items` from here
/Users/geohuz/.choosenim/toolchains/nim-1.4.8/lib/system/iterators.nim(87, 19) template/generic instantiation of `..` from here
/Users/geohuz/.choosenim/toolchains/nim-1.4.8/lib/system/iterators_1.nim(85, 12) Error: type mismatch: got <TOPIC>
but expected one of:
proc inc[T: Ordinal](x: var T; y = 1)
first type mismatch at position: 1
required type for x: var T: Ordinal
but expression 'res' is of type: TOPIC
expression: inc(res)
The text was updated successfully, but these errors were encountered:
It can be caused by change in nim-lang/Nim#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:
The text was updated successfully, but these errors were encountered: