# `syntax.match_arrow`

Match arm uses `=>`.

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

```jadpo
type TicketStatus = Enum {
    open
    closed
}

type Rank = Int {
    min: 1
}

function rank(status: TicketStatus) -> Rank {
    return match status {
        TicketStatus.open => 1
        TicketStatus.closed -> 2
    }
}
```

```text
error: Jadpo writes `->`, not `=>`
 --> main.jadpo:12:27
   |
12 |         TicketStatus.open => 1
   |                           ^^ write `->`
  reason: `=>` ends a match arm's pattern in Rust, Scala, C# and PHP; a Jadpo arm uses `->`, the same arrow as a result type.
  next: Use `->` instead of `=>` (agent)
  rule: syntax.match_arrow
  help: https://jadpo.dev/docs/errors/syntax.match_arrow

check failed: 1 error, 1 file
```
