# E0242

`?` on a `Result` whose error type is not the enclosing function's error type, with no `impl From` to convert it. Spans the `?` expression.

**Machine-applicable fix:** none.

## Example

This program fails with `E0242`.

```oska
fn parse() -> Result<Int, String> {
    Err("bad")
}

fn run() -> Result<Int, Int> {
    let n = parse()?
    Ok(n)
}
```

## Fixed

The same program, fixed.

```oska
fn parse() -> Result<Int, String> {
    Err("bad")
}

fn run() -> Result<Int, String> {
    let n = parse()?
    Ok(n)
}
```

Listed in the [checker notes](/checker.md#e0242). `oskac explain E0242` prints this entry offline.