# XO0303: refutable pattern where an irrefutable one is required

`let` and `for` bind every value they get, so their patterns must match every value of the type, such as `(a, b)` for a tuple or `P{x, y}` for a struct. A pattern that can fail, such as `Some(v)`, needs a construct that says what happens otherwise: `if let`, `match`, `??`, or `?`. The message names a value that is not covered. See core 3.5.

## Example

```xo
fn f(o: Int?) -> Int {
  let Some(v) = o
  v
}
```

## Fix

```xo
fn f(o: Int?) -> Int {
  if let Some(v) = o { v } else { 0 }
}
```

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

