# `semantic.not_callable`

Name cannot be called.

Area 1, [Project layout and modules](/docs/project-layout-and-modules.md); not declinable; the next step is usually the agent's.

```jadpo
type OutOfStock = Failure {
    kind: FailureKind.conflict
}

action reserve_item() fails OutOfStock -> Unit {
    reject OutOfStock()
}
```

```text
error: `OutOfStock` is a failure and can't be called
 --> main.jadpo:6:12
  |
6 |     reject OutOfStock()
  |            ^^^^^^^^^^ not callable
  reason: A failure is raised with `reject OutOfStock`, with its fields in a block when it has any.
  next: Write `OutOfStock` without `()` (agent)
  rule: semantic.not_callable
  help: https://jadpo.dev/docs/errors/semantic.not_callable

check failed: 1 error, 1 file
```

A fixture builds test data, so only tests, other fixtures and seeds call it
(area 13); an action can't, even when the fixture is `public`:





```jadpo
use planning/types { TodoCount }
use planning/fixtures { two_open_todos }

action count_todos() -> TodoCount {
    return two_open_todos()
}
```

```text
error: An action can't call fixture `two_open_todos`
 --> domains/planning/actions/count_todos.jadpo:5:12
  |
5 |     return two_open_todos()
  |            ^^^^^^^^^^^^^^ test data
  reason: A fixture builds test data: only tests, other fixtures and seeds call it, and it is never compiled into a deployable.
  next: Call the actions `two_open_todos` calls, or move this call into a test, fixture or seed (agent)
  rule: semantic.not_callable
  help: https://jadpo.dev/docs/errors/semantic.not_callable

check failed: 1 error, 5 files
```

`some` is only a `match` pattern. A value that may be missing takes the
value itself, and the edit writes it:

```jadpo
type Title = Text {
    max_length: 40
}

function chosen(title: Title) -> Title? {
    return some(title)
}
```

```text
error: `some` is a match pattern and can't be called
 --> main.jadpo:6:12
  |
6 |     return some(title)
  |            ^^^^ not callable
  reason: A value that may be missing takes the value itself, as in `return title`, or `none`; `some(name)` only matches a present value in a `match`.
  next: Write `title` instead of `some(title)` (agent)
  rule: semantic.not_callable
  help: https://jadpo.dev/docs/errors/semantic.not_callable

check failed: 1 error, 1 file
```
