Logic · rule
semantic.unreachable_code
Code can never run.
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 { return "small" if (count > 10) { return "large" }}
error: This code never runs --> main.jadpo:9:5 |8 | return "small" | -------------- leaves on every path9 | if (count > 10) { | ^^^^^^^^^^^^^^^^^ never reached reason: The statement before it ends in `return` or `reject` on every path, so nothing after it in this block can run. next: Remove it, or move it before the statement that leaves (agent) rule: semantic.unreachable_code help: https://jadpo.dev/docs/errors/semantic.unreachable_codecheck failed: 1 error, 1 file
Markdown for agents: /docs/errors/semantic.unreachable_code.md.Built from Jadpo main at a707efb.