semantic.missing_return
Callable can end without returning its result.
Area 3, Logic; not declinable; the next step is usually the agent's.
type Count = Int { min: 0}type Size = Text {}function size_of(count: Count) -> Size { if (count > 10) { return "large" }}
error This function can end without returning a Size
--> main.jadpo:11:1
|11 | } | ^ reached without `return`
- reason
- Every path through a function with a result ends in
returnorreject; at least one path here reaches the end of the body. - next
- Return a
Sizeat the end, or on every branch that reaches it (agent) - rule
- semantic.
missing_ return - help
- https://jadpo.
dev/docs/errors/semantic. missing_ return
Markdown for agents: /docs/errors/semantic.missing_return.md.Built from Jadpo main at aee2e8f.