# XO0406: operator, index, slice, or iteration not defined for the type

The operation does not exist for this type: arithmetic between `Duration` and a plain integer literal, `Time + Time`, indexing a `Str` by position, slicing something other than `List`, `Bytes`, or `Str`, `for` over a value that is not a List, Set, Map, Chan, Bytes, or range, `??` on a non optional, or `expect(x)` without a comparison. Durations need units (`5s`), and a `Str` is read with `runes()` or by slicing. See core 2.1, 3.5, and 3.6.

## Example

```xo
fn f(d: Duration) -> Duration { d + 5 }
```

## Fix

```xo
fn f(d: Duration) -> Duration { d + 5s }
```

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

