Closed wyager closed 3 years ago
> toEnum 7 :: P.PrimeField (2^127 - 1) *** Exception: PrimeField.toEnum: bad argument
toEnum should not use toInt. Instead it should convert both the input Int and the input PrimeField p to integers and compare those.
toEnum
toInt
Int
PrimeField p
Good catch. Thanks!
@wyager, I released version 0.10.0 with the fix of this issue.
0.10.0
toEnum
should not usetoInt
. Instead it should convert both the inputInt
and the inputPrimeField p
to integers and compare those.