Xo is experimental. The source code is not public yet; it will be soon. Read the release notes
Menu · XO0409

Docs

XO0409: invalid explicit conversion

error · reported by the checker

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.