semantic.unused_result
Value is computed and thrown away.
Area 3, Logic; not declinable; the next step is usually the agent's.
A call stands on its own only when its result is Unit, and a function called on its own does nothing:
type Note = Text {}function tidy(note: Note) -> Note { return note}action save(note: Note) -> Unit { tidy(note)}
error This Note is thrown away
--> main.jadpo:8:5
|8 | tidy(note) | ^^^^^^^^^^ result not used
- reason
tidyonly computes its result, so calling it without using the result does nothing.- next
- Use the value, or remove it (agent)
- rule
- semantic.
unused_ result - help
- https://jadpo.
dev/docs/errors/semantic. unused_ result
Markdown for agents: /docs/errors/semantic.unused_result.md.Built from Jadpo main at aee2e8f.