Closed mlutze closed 1 week ago
This probably in the new parser.
@herluf-ba May be able to help.
Can you post the program in text-- makes it easier to reproduce.
enum UnsignedInt32(Int32) with Eq
mod UnsignedInt32 {
pub def fromString(s: String): Option[UnsignedInt32] = {
import static java.lang.Integer.parseUnsignedInt(String): Int32 \ {};
Result.tryCatch(() -> parseUnsignedInt(s)) |> Result.toOption |> Option.map(UnsignedInt32)
}
pub def toString(u: UnsignedInt32): String = {
import static java.lang.Integer.toUnsignedString(Int32): String \ {};
let UnsignedInt32.UnsignedInt32(i) = u;
toUnsignedString(i)
}
}
Fixed.