Open anton-trunov opened 3 years ago
Yes, that seems confusing. @rixed what do you think?
Given the quoted documentation and the fact that other Int modules seem to raise an exception (although not Failure but Invalid_arg, which looks better to me), I'd say that Uint128.of_string should indeed raise. I would favor if all of the of_string functions would raise the same exception BTW.
Actual behavior
Here is a toplevel session:
Basically, this is the maximum 128-bit unsigned integer. It behaves the same for the rest of bit widths.
Expected behavior
Raises an exception according to the description here:
https://github.com/andrenth/ocaml-stdint/blob/48f97cd7e577a432064f33e4c2ad6859826716ad/lib/stdint.mli#L292-L297: