XO0409: invalid explicit conversion
Numeric conversions such as Int(x) and Float(x) take a number. Text is not a number: parse it with Int.parse(s), which returns Int?, and decide what a bad input means. See core 2.1.
Example
fn f(s: Str) -> Int { Int(s) }Fix
fn f(s: Str) -> Int { Int.parse(s) ?? 0 }Run xo explain XO0409 for this text in a terminal, or see
section 10.6 of the specification.