# XO0401: value of the wrong type; only three implicit conversions exist

The value's type is not the expected one. Xo converts implicitly in exactly three cases, each only where the target type is known: `T` to `T?`, a value to an interface it implements, and an error at `?` to the enclosing error type. Everything else is explicit, including all numeric conversions (`Float(i)`) and newtypes (`Email(s)`). Branches of `if` and `match` must already agree; annotate the binding to give them an expected type. See core 2.10.

## Example

```xo
fn f(i: Int) -> Float { i }
```

## Fix

```xo
fn f(i: Int) -> Float { Float(i) }
```

Run `xo explain XO0401` for this text in a terminal, or see
[section 10.6 of the specification](../../spec/core/#106-diagnostic-codes).

