ErrorsProject layout and modules · rule
semantic.not_callable
Name cannot be called.
Area 1, Project layout and modules; not declinable; the next step is usually the agent's.
type OutOfStock = Failure { kind: FailureKind.conflict}action reserve_item() fails OutOfStock -> Unit { reject OutOfStock()}
error OutOfStock is a failure and can't be called
--> main.jadpo:6:12
|6 | reject OutOfStock() | ^^^^^^^^^^ not callable
- reason
- A failure is raised with
reject OutOfStock, with its fields in a block when it has any. - next
- Write
OutOfStockwithout()(agent) - rule
- semantic.
not_ callable - help
- https://jadpo.
dev/docs/errors/semantic. not_ callable
A fixture builds test data, so only tests, other fixtures and seeds call it
(area 13); an action can't, even when the fixture is public:
use planning/types { TodoCount }use planning/fixtures { two_open_todos }action count_todos() -> TodoCount { return two_open_todos()}
error An action can't call fixture two_open_todos
--> domains/planning/actions/count_todos.jadpo:5:12
|5 | return two_open_todos() | ^^^^^^^^^^^^^^ test data
- reason
- A fixture builds test data: only tests, other fixtures and seeds call it, and it is never compiled into a deployable.
- next
- Call the actions
two_open_todoscalls, or move this call into a test, fixture or seed (agent) - rule
- semantic.
not_ callable - help
- https://jadpo.
dev/docs/errors/semantic. not_ callable
some is only a match pattern. A value that may be missing takes the
value itself, and the edit writes it:
type Title = Text { max_length: 40}function chosen(title: Title) -> Title? { return some(title)}
error some is a match pattern and can't be called
--> main.jadpo:6:12
|6 | return some(title) | ^^^^ not callable
- reason
- A value that may be missing takes the value itself, as in
return title, ornone;some(name)only matches a present value in amatch. - next
- Write
titleinstead ofsome(title)(agent) - rule
- semantic.
not_ callable - help
- https://jadpo.
dev/docs/errors/semantic. not_ callable
Markdown for agents: /docs/errors/semantic.not_callable.md.Built from Jadpo main at aee2e8f.