# `type.logical_operand`

Logical operator needs Bool operands.

Area 3, [Logic](../topics/logic.md); not declinable; the next step is usually the agent's.

```jadpo
type Score = Int {}

type Flag = Bool {}

function both(score: Score) -> Flag {
    return Flag(score and score)
}
```

```text
error: `and` needs `Bool` values, and `score` is a `Score`
 --> main.jadpo:6:17
  |
6 |     return Flag(score and score)
  |                 ^^^^^ this is `Score`
  reason: `and` and `or` work on `Bool` values and types built on `Bool`; Jadpo has no truthiness.
  next: Compare `score` to get a `Bool` (agent)
  rule: type.logical_operand
  help: https://jadpo.dev/docs/errors/type.logical_operand

check failed: 1 error, 1 file
```
