---
title: "U2013: `it` or `error` outside its allowed position"
url: https://una-lang.org/en/docs/errors/U2013/
release: v0.4.0
source: https://github.com/una-lang/una/blob/v0.4.0/crates/una-explain/explain/U2013.md
---

# U2013: `it` or `error` outside its allowed position

`it` names the value being refined, so it appears only in a `where` clause and in the predicate of `checked`; `error` names the failure being handled, so it appears only in the `fail` or `use` part of an `if error` clause (`spec/02 §8`).

## The repair at a glance

```diff
  module demo

  pub kind Small = Int where it < 100

- pub bound(x: Small) -> Int = it
+ pub bound(x: Small) -> Int = x
```

## Failing example

```una
module demo

pub kind Small = Int where it < 100

pub bound(x: Small) -> Int = it
```

## Fixed example

```una
module demo

pub kind Small = Int where it < 100

pub bound(x: Small) -> Int = x
```
