# `type.assign_immutable`

Value that never changes is assigned.

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

```jadpo
type Choice = Text {}

function replace(initial: Choice, replacement: Choice) -> Choice {
    var fixed: Choice = initial
    fixed = replacement
    return fixed
}
```

```text
error: `fixed` can't be changed
 --> main.jadpo:5:5
  |
4 |     var fixed: Choice = initial
  |         ----- declared without `mut`
5 |     fixed = replacement
  |     ^^^^^ assigned here
  reason: `var` names a value that never changes; only a `var mut` can be pointed at a new value.
  next: Declare it `var mut fixed` (agent)
  rule: type.assign_immutable
  help: https://jadpo.dev/docs/errors/type.assign_immutable

check failed: 1 error, 1 file
```
