failure.outcome_pattern_invalid
Outcome match arm has a pattern for values.
Area 3, Logic; not declinable; the next step is usually the agent's.
A match on a call's outcome has no patterns for values:
function lookup_label(key: LookupKey) -> LookupResult { return match lookup(key) { success(value) -> value LookupMissing -> "missing" LookupRefused -> "refused" none -> "nothing" }}
error none can't match a call's outcome
--> main.jadpo:6:9
|6 | none -> "nothing" | ^^^^ a pattern for values
- reason
- A
matchonlookup(...)has asuccess(name)arm for its value and an arm for each failure it can give; to look at the value's own cases, match on the success value. - next
- Remove this arm, or match on the success value inside
success(...)(agent) - rule
- failure.
outcome_ pattern_ invalid - help
- https://jadpo.
dev/docs/errors/failure. outcome_ pattern_ invalid
Markdown for agents: /docs/errors/failure.outcome_pattern_invalid.md.Built from Jadpo main at aee2e8f.