the given example crashes at runtime:
use fmt;
use strconv;
export fn main() void = {
fmt::println(strconv::stou64("1000", strconv::base::HEX_LOWER)!)!;
};
if you use only `base::HEX` it works fine. I tried with only numerical
values and with other valid hex such as `fa0`, both fails every time.
I get an assertion at strconv/stou.ha:22:66.
I just did a git pull on both harec and hare, so I assume this was not
fixed yet.
Thanks. I've sent a patch to fix this. You can just use base::HEX for
string->number conversions and it will handle both upper and lower case
correctly. HEX_LOWER and HEX_UPPER only matter for number->string.
Eventually I want to get rid of HEX_LOWER and HEX_UPPER entirely in
favor of a flag to the number->string functions. But for now this should
help.