ErrorsValues and types · rule
type.constructor_argument_count
Constructor is not given exactly one value.
Area 2, Values and types; not declinable; the next step is usually the agent's.
type Quantity = Int { min: 1}function pair() -> Quantity { return Quantity(1, 2)}
error Quantity(...) takes one value, not 2
--> main.jadpo:6:12
|6 | return Quantity(1, 2) | ^^^^^^^^^^^^^^ 2 given
- reason
- Constructing a
Quantitychecks one value against its rules. - next
- Pass one value to
Quantity(...)(agent) - rule
- type.
constructor_ argument_ count - help
- https://jadpo.
dev/docs/errors/type. constructor_ argument_ count
Markdown for agents: /docs/errors/type.constructor_argument_count.md.Built from Jadpo main at aee2e8f.