Failures · rule
syntax.fails_after_result
Fails list comes after the result type.
Area 4, Failures; not declinable; the next step is usually the agent's.
type Title = Text { max_length: 200}type TitleBlank = Failure { kind: FailureKind.invalid_value message: "Enter a title."}function check_title(title: Title) -> Title fails TitleBlank { if (title == "") { reject TitleBlank } return title}
error: `fails` goes before `->` --> main.jadpo:10:45 |10 | function check_title(title: Title) -> Title fails TitleBlank { | ^^^^^^^^^^^^^^^^ after the result type reason: A signature says what can fail before what it returns: `fails A, B -> Result`. next: Move `fails TitleBlank` before `->` (agent) rule: syntax.fails_after_result help: https://jadpo.dev/docs/errors/syntax.fails_after_resultcheck failed: 1 error, 1 file
Markdown for agents: /docs/errors/syntax.fails_after_result.md.Built from Jadpo main at a707efb.